Файли
openidea/docs
Yohann CATHERINEтаyohannlog f404a33e7a feat(cpp): clangd reads the active CMake profile's compilation database (#7551)
In a CMake project with profiles or presets, clangd searched for compile_commands.json in each file's parent folders and their build/, so it could read another profile's or a stale database: test sources showed missing GoogleTest headers although the active profile compiles them. clangd now starts with --compile-commands-dir set to the active profile's build directory once it has a compile_commands.json. The window restarts this project's clangd when another profile becomes active, or when the IDE configures the active profile's directory for the first time. That first configure runs as a build task, so the restart follows the configurations reloading without the needs-configure mark instead of a run session's exit. An explicit --compile-commands-dir, a root compile_commands.json and a .clangd naming a CompilationDatabase are left alone.

Co-authored-by: yohannlog <[email protected]>
2026-12-02 23:55:03 +08:00
..
2026-12-01 11:42:31 +08:00