premake-core
premake-core copied to clipboard
Any possibility to get compile_commands.json out of the box?
What's your question? Hey! Im new to premake, Im surprised that I can't easily find any info about compile_commands.json. I've only found a couple of links to 5-6 years old plugin to premake. My Sublime Text experience for C++ projects only possible with clangd, which requires compile_commands.json, so is it thing here? If it is, maybe write any docs in README.md, because it pretty major thing. If its not, why it isn't implemented? Time constraints?
Hey @krupitskas.
I have a branch with a WIP implementation: https://github.com/tritao/premake-core/commit/64113fcb7657d3d2714221fe619d7b462d66d380
I haven't sent a PR yet because I got some issues with getting the test to work at the time, even after trying for a while.
@starkos @samsinsane Maybe one of you could take a look?
If its not, why it isn't implemented? Time constraints?
As you can probably already tell, it is not supported. As for why, time is the single largest factor. We have also been taking a "module first" approach to these things. If you feel that this is a must have feature for Premake, feel free to create a module and if it gains traction in the community we can consider bringing it into core.
Maybe one of you could take a look?
It looked okay to me? But it's been awhile since I've added a new module with unit test support.
@tritao any plans to update your PR?
From the "old" module https://github.com/tarruda/premake-export-compile-commands I submit a PR with all fork improvement + mines: https://github.com/Jarod42/premake-export-compile-commands/tree/Improvements