CMakePresets: 启用 compile_commands.json 导出(IDE/静态分析用)

This commit is contained in:
2026-08-22 13:13:12 +08:00
parent 351d6ef40c
commit d51dce4ae3
+2 -1
View File
@@ -13,7 +13,8 @@
"binaryDir": "${sourceDir}/build/${presetName}", "binaryDir": "${sourceDir}/build/${presetName}",
"cacheVariables": { "cacheVariables": {
"CMAKE_C_COMPILER": "gcc", "CMAKE_C_COMPILER": "gcc",
"CMAKE_CXX_COMPILER": "g++" "CMAKE_CXX_COMPILER": "g++",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
} }
}, },
{ {