File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 99# The solution files get generated by vcpkg on Windows
1010# and by the C# Dev Kit within a dev container.
1111* .sln
12+
13+ # clangd language server support
14+ compile_commands.json
15+ .cache
Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ if (UNIX AND NOT CMAKE_BUILD_TYPE)
1111 set (CMAKE_BUILD_TYPE "Release" CACHE STRING "Specifies the build type on single-configuration generators" FORCE)
1212endif ()
1313
14+ set (CMAKE_EXPORT_COMPILE_COMMANDS true )
15+
1416set (CMAKE_DEBUG_POSTFIX d)
1517set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR} /bin/${VCPKG_TARGET_TRIPLET} )
1618set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR} /bin/${VCPKG_TARGET_TRIPLET} )
Original file line number Diff line number Diff line change 8383 build_dir=build/$triplet -$( tr A-Z a-z <<< $build_type )
8484 cmake -B $build_dir -S . -D VCPKG_TARGET_TRIPLET=$triplet -D CMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT /scripts/buildsystems/vcpkg.cmake -D CMAKE_BUILD_TYPE=$build_type $options
8585 cmake --build $build_dir -j ${nproc}
86- done
86+ if [ " ${build_type} " == " Debug" ]
87+ then
88+ ln -snf $build_dir /compile_commands.json .
89+ fi
90+ done
You can’t perform that action at this time.
0 commit comments