File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,13 @@ up-to-date later on.
167167For a debug build, use ` -DCMAKE_BUILD_TYPE=Debug ` . To tweak various settings (e.g. warnings) for development,
168168use ` -DENABLE_DEVEL_DEFAULTS=ON ` .
169169
170+ To use ` clangd ` via Visual Studio Code, specify ` -DCMAKE_EXPORT_COMPILE_COMMANDS=1 ` . Then link the
171+ ` compile_commands.json ` file from the build directory into the source directory. When using the ` subdirs `
172+ project you can create a symlink to the subdirs project in the individual projects (e.g.
173+ ` compile_commands.json -> ../subdirs/syncthingtray/compile_commands.json ` ) and a symlink to the actual build
174+ directory in the subdirs project (e.g.
175+ ` compile_commands.json -> /…/build/presets/syncthingtray/arch-android-x86_64/compile_commands.json ` ).
176+
170177#### CMake presets
171178There are some generic [ presets] ( https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html ) available.
172179
You can’t perform that action at this time.
0 commit comments