-
-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate compile_commands.json #395
Comments
What is this "load an existing compile_commands.json?" Why? |
Because B2 can do very fine grained incremental builds. And if you want to get a full picture of the project you can't throw away the history of what you previously compiled on each |
That is a nice to have feature but maybe not strictly required for an initial proof of concept. |
I think, the described approach is actually not needed. Running with different build requests, and appending commands to Rather, I think something like There's also a question what to do with ancillary targets e.g. created by ac module. Maybe potentially add an engile rule that marks a target as hidden? Now, that I think of it, what if we can mark Jam targets as watched (maybe by setting a variable on them), and then their actions get recorded into some list in the form of |
After my many questions in slack, adjusted plan:
|
LGTM |
Step 0? Structured data output to JSON complete: c30bce8 |
…399) This implements obtaining and generating compile commands from toolsets that compile C or C++ sources. I.e. implements both the --command-database=json amd --command-database-out=<filename> CLI options. Although it implements the toolset changes for most compilers, only a few are tested. Fixes #395
Many IDEs and downstream tools want to parse a
compile_commands.json
. The ideal solution for B2 would be to have single command actions to record. But since B2 currently doesn't guarantee such single command actions we need something else until we get those. The following is a "kludge" way of doing it. But something is better than nothing. What we need to implement:COMPILE_COMMAND
that sets a regex that extracts the command.COMPILE_COMMAND
for each appropriate action.The text was updated successfully, but these errors were encountered: