Closed DaydreamCoding closed 4 months ago
Guessing what you are looking for is a compilation database: Follow cmake's guide to export the compilation database, and then check the readme of this extension again.
Guessing what you are looking for is a compilation database: Follow cmake's guide to export the compilation database, and then check the readme of this extension again.
If cmake.buildDirectory has a default setting but is modified to a new path by cmakepreset's binaryDir, CMAKE_EXPORT_COMPILE_COMMANDS are not found
Temporary solution project setting.json:
"cmake.copyCompileCommands" : "${workspaceFolder}/.vscode/compile_commands.json",
"vscode-cppinsights.buildDirectoryPrioritizeCMake": false,
"vscode-cppinsights.buildDirectory": "${workspaceFolder}/.vscode"
The project uses cmake to build, there are various header file dependencies, using a single file will find a variety of files.
how to use cppinsights and cmake together