Skip to content

Commit

Permalink
fix: create .clangd only if it does not exists
Browse files Browse the repository at this point in the history
When multiple cmake configure are running, sharing the same project filesystem
a conflict may arise writing to that same file.
  • Loading branch information
abdes committed Oct 22, 2024
1 parent a368b61 commit 8942178
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ configure_file(templates/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/${META
# different for every preset and can be different as well when the user decides
# to build somewhere else. Currently we cannot configure this properly in vscode
# settings. See https://github.com/clangd/vscode-clangd/issues/48
configure_file(.clangd.in ${CMAKE_SOURCE_DIR}/.clangd @ONLY)
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/.clangd)
configure_file(.clangd.in ${CMAKE_SOURCE_DIR}/.clangd @ONLY)
endif()

# ------------------------------------------------------------------------------
# Documentation - doxygen, sphinx/breathe/exhale
Expand Down

0 comments on commit 8942178

Please sign in to comment.