build: write .clangd with proper compile_commands path on configure

This commit is contained in:
2025-12-19 10:33:14 +03:00
parent 6ac9c03ec4
commit 82998d688c
3 changed files with 7 additions and 1 deletions

2
.gitignore vendored
View File

@@ -3,6 +3,8 @@
.vs .vs
out out
.clangd
build/ build/
build-msvc/ build-msvc/
CMakeCache.txt CMakeCache.txt

View File

@@ -10,6 +10,10 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
file(WRITE "${CMAKE_SOURCE_DIR}/.clangd"
"CompileFlags:
CompilationDatabase: ${CMAKE_BINARY_DIR}")
option(USE_SYSTEM_GLFW "Use system-installed GLFW instead of fetching it statically" OFF) option(USE_SYSTEM_GLFW "Use system-installed GLFW instead of fetching it statically" OFF)
message(STATUS "USE_SYSTEM_GLFW: ${USE_SYSTEM_GLFW}") message(STATUS "USE_SYSTEM_GLFW: ${USE_SYSTEM_GLFW}")

View File

@@ -6,7 +6,7 @@
namespace clrsync::core namespace clrsync::core
{ {
const std::string GIT_SEMVER = "0.1.7+git.g2a43348"; const std::string GIT_SEMVER = "0.1.7+git.g6ac9c03";
const std::string version_string(); const std::string version_string();
} // namespace clrsync::core } // namespace clrsync::core