[cbuild2cmake] Build compilation database by default and add database target to superlists #196
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR makes the database step run by default, since it is very cheap and in almost all cases the compilation database is needed anyway. This also ensures the compilation database in the
out/
folder is up-to-date without needing to runcbuild setup
after every project change.This PR also adds a
database
target to the superlists CMake, which automatically triggers database generation for all contexts. This makes it quite convenient to generate all compilation databases without needing to spell out the individual context targets.I'm not sure if this is what you have in mind for the compilation database generation flow, but it would greatly improve our workflow, since separately running
cbuild setup
is (a) sometimes slow, and (b)cbuild setup
doesn't work properly for some of our projects since we have solutions where we build multiple projects with different target-types together, whichcbuild setup
doesn't support ("invalid combination of contexts specified in SOLUTION.cbuild-set.yml").