Closed theComputeKid closed 7 months ago
A few people have asked for compile_command.json generation.
There is 2 (external) premake modules which should do that:
@nickclark2016 : If you don't mind, could you also review the addition of clangtidy
to the sidebar, as it is related to this change. I was unaware of the need to add this and I missed it in #2187. In any case, I will make the addition you requested. Thank you.
What does this PR do?
This is a follow up to a previous PR: #2187
After enabling clang-tidy as an option in the VS IDE (#2187), this patch allows us to enforce it at build time. This can significantly increase build time, as you would expect from any static analysis tool. When building VS projects using this option, along with #2187, the log will show:
A few people have asked for compile_command.json generation. On Linux/Macos, tools exist to generate this (e.g.
bear
etc). This is tricky on windows. As an extra side-benefit of this change, as seen in the log above, a compile_commands.json file is generated in the location specified with the-p
flag. However, while useful, this is a side-effect of this change and not its primary purpose.How does this PR change Premake's behavior?
Add configuration-scoped option
runcodeanalysis
for Visual Studio 2019 and above.Did you check all the boxes?
closes #XXXX
in comment to auto-close issue when PR is merged)