Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ packages
# The solution files get generated by vcpkg on Windows
# and by the C# Dev Kit within a dev container.
*.sln

# clangd language server support
compile_commands.json
.cache
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ if (UNIX AND NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Specifies the build type on single-configuration generators" FORCE)
endif ()

set(CMAKE_EXPORT_COMPILE_COMMANDS true)

set(CMAKE_DEBUG_POSTFIX d)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/${VCPKG_TARGET_TRIPLET})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/${VCPKG_TARGET_TRIPLET})
Expand Down
6 changes: 5 additions & 1 deletion build_unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,8 @@ do
build_dir=build/$triplet-$(tr A-Z a-z <<<$build_type)
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
cmake --build $build_dir -j ${nproc}
done
if [ "${build_type}" == "Debug" ]
then
ln -snf $build_dir/compile_commands.json .
fi
done
Loading