Skip to content
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

[cbuild2cmake] Build compilation database by default and add database target to superlists #196

Conversation

EaselinkBachmann
Copy link
Contributor

@EaselinkBachmann EaselinkBachmann commented Sep 26, 2024

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 run cbuild 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, which cbuild setup doesn't support ("invalid combination of contexts specified in SOLUTION.cbuild-set.yml").

This allows running `cbuild SOLUTION --target database` to generate all
compilation databses, which is quite convenient to have.
Copy link
Collaborator

@brondani brondani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@brondani brondani merged commit d4b8d16 into Open-CMSIS-Pack:main Sep 30, 2024
14 checks passed
@EaselinkBachmann EaselinkBachmann deleted the feature/build-database-by-default branch October 1, 2024 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants