aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--CMakeLists.txt5
-rw-r--r--CPackConfig.cmake2
3 files changed, 8 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 0baa4fa1..da6827ca 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,6 +4,8 @@
*.swp
*~$
cscope.*
+compile_commands.json
+/.clangd
tags
/build
/obj*
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5dce15e1..21d6fcad 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -205,6 +205,11 @@ endif (WITH_SYMBOL_VERSIONING AND ABIMAP_FOUND)
add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source DEPENDS ${_SYMBOL_TARGET})
+# Link compile database for clangd
+execute_process(COMMAND cmake -E create_symlink
+ "${CMAKE_BINARY_DIR}/compile_commands.json"
+ "${CMAKE_SOURCE_DIR}/compile_commands.json")
+
message(STATUS "********************************************")
message(STATUS "********** ${PROJECT_NAME} build options : **********")
diff --git a/CPackConfig.cmake b/CPackConfig.cmake
index 51b300cc..90065139 100644
--- a/CPackConfig.cmake
+++ b/CPackConfig.cmake
@@ -10,7 +10,7 @@ set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
# SOURCE GENERATOR
set(CPACK_SOURCE_GENERATOR "TXZ")
-set(CPACK_SOURCE_IGNORE_FILES "~$;[.]swp$;/[.]git/;.gitignore;/build*;/obj*;tags;cscope.*")
+set(CPACK_SOURCE_IGNORE_FILES "~$;[.]swp$;/[.]git/;/[.]clangd/;.gitignore;/build*;/obj*;tags;cscope.*;compile_commands.json")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
### NSIS INSTALLER