-
Notifications
You must be signed in to change notification settings - Fork 207
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
Build Error from compile commands generator on MBS projects with build location outside workspace #1058
Comments
AFAICT this only happens if or in the project properties @Kummallinen I see you self-assigned, lmk if you want any help with this. |
Thanks @jonahgraham, I've asked @alicetrifu to look at this so we can get a fix into CDT 12. Not sure why but I can't assign it to her |
Hello @jonahgraham , Before proceeding with a fix, I seek your guidance on the optimal approach for generating the CompilationDatabase within the CommonBuilder class. Currently, this generation occurs in the build method:
To determine if the Makefile generator is active, one approach involves declaring here as well a BuildStatus instance as follows:
This instance would then serve as a condition for generating the CompilationDatabase in this place. Alternatively, we could relocate the generation of the compile_commands.json file to the performPrebuildGeneration method, where information related to the ManagedBuild is already accessible. (Tested this and seems to work fine as well) In your opinion, which of these solutions would be more efficient and align better with our existing architecture? Thank you, |
This seems like the better case to me. |
Moved compile_commands.json file to performPrebuildGeneration, so the file to be generated only when Makefiles generation is set to be on.
Moved compile_commands.json file to performPrebuildGeneration, so the file to be generated only when Makefiles generation is set to be on.
Describe the bug
When building an MBS project that has the build location set to outside of the workspace the build errors with an NPE in CompilationDatabaseGenerator.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Should disable compile-commands.json generation when makefile generation is disabled, as the invoked build may not match the MBS settings
The text was updated successfully, but these errors were encountered: