forked from microsoft/vscode-cpptools
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Yiftah Waisman edited this page Oct 20, 2024
·
15 revisions
- CMake pull request:
compdb: mergedCompileCommands for CMake subprojects
- cpptools issue:
Support multiple compile commands files per project
- must use
CMake
as the build system - must use VSCode's
CMake Tools
to build your project (runningcmake ..
,make
on your project will not causeCMake Tools
to merge the generated db files)
- define the following entries in
.vscode/settings.json
:
// already implemented
"C_Cpp.default.compileCommands": "${workspaceFolder}/build/merged_compile_commands.json",
// new
"C_cpp.mergeCompileCommands": {
"source": [
"${workspaceFolder}/build/proj1/compile_commands.json",
"${workspaceFolder}/build/proj2/compile_commands.json",
],
"destination": "${workspaceFolder}/build/merged_compile_commands.json"
},
-
"C_Cpp.default.compileCommands"
is not changed to an array for backwards compatibility, specifying multiple sources will not inform where the destination file should be saved. -
"C_Cpp.default.compileCommands"
can also be ignored and overridden toC_cpp.mergeCompileCommands.destination
(not mandatory)
- fill me with data
- fill me with data