[cbuild2cmake] Add dependency for triggering compile_commands.json update#468
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
|
Coverage Impact This PR will not change total coverage. Modified Files with Diff Coverage (1)
🛟 Help
|
There was a problem hiding this comment.
Pull request overview
This PR ensures the generated database target refreshes the exported ${OUT_DIR}/compile_commands.json whenever CMake regenerates ${CMAKE_CURRENT_BINARY_DIR}/compile_commands.json, addressing cases where the compilation database copy step previously would not re-run after updates.
Changes:
- Add an explicit
DEPENDS "${CMAKE_COMPILE_COMMANDS}"to the custom command that copiescompile_commands.json. - Update golden/reference
CMakeLists.txttest fixtures to match the newly generated output. - Update the generator (
pkg/maker/contextlists.go) so all newly produced contextCMakeLists.txtinclude the dependency.
Reviewed changes
Copilot reviewed 42 out of 42 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
pkg/maker/contextlists.go |
Updates the generated context CMakeLists “database” copy rule to depend on the source compile_commands.json. |
test/data/solutions/pre-include/ref/project.IAR+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/pre-include/ref/project.GCC+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/pre-include/ref/project.CLANG+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/pre-include/ref/project.AC6+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/pre-include-oot/ref/project.IAR+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/pre-include-oot/ref/project.GCC+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/pre-include-oot/ref/project.CLANG+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/pre-include-oot/ref/project.AC6+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/linker-pre-processing/ref/project.IAR+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/linker-pre-processing/ref/project.GCC+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/linker-pre-processing/ref/project.CLANG+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/linker-pre-processing/ref/project.AC6+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/link-lib/ref/project.GCC+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/link-lib/ref/project.CLANG+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/library-rtos/ref/project.IAR+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/library-rtos/ref/project.GCC+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/library-rtos/ref/project.CLANG+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/library-rtos/ref/project.AC6+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/language-scope/ref/project.IAR+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/language-scope/ref/project.GCC+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/language-scope/ref/project.CLANG+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/language-scope/ref/project.AC6+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/include-define/ref/project.IAR+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/include-define/ref/project.GCC+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/include-define/ref/project.CLANG+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/include-define/ref/project.AC6+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/executes/ref/project.Release+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/build-cpp/ref/project.IAR+ARMCM55/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/build-cpp/ref/project.GCC+ARMCM55/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/build-cpp/ref/project.CLANG+ARMCM55/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/build-cpp/ref/project.AC6+ARMCM55/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/build-c/ref/project.IAR+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/build-c/ref/project.GCC+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/build-c/ref/project.CLANG+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/build-c/ref/project.AC6+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/build-asm/ref/project.IAR+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/build-asm/ref/project.GCC+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/build-asm/ref/project.CLANG+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/build-asm/ref/project.AC6+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/blanks/ref/project X.AC6 X+ARMCM0 X/CMakeLists.txt |
Updates reference output to include the new dependency line. |
test/data/solutions/abstractions/ref/project.GCC+ARMCM0/CMakeLists.txt |
Updates reference output to include the new dependency line. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Fixes
Checklist