aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2020-03-06 17:35:16 +0100
committerAndreas Schneider <asn@samba.org>2020-03-19 12:06:20 +0100
commitf007f04f674f1c978d0e325c9c7ce899cefb92c1 (patch)
treed99385e6fe09db08fd0380c1bd8e21f1f5ca71c0
parentcb9938838c4dfd5720b4e778fc39aeee7bf49f09 (diff)
downloadpam_wrapper-f007f04f674f1c978d0e325c9c7ce899cefb92c1.tar.gz
pam_wrapper-f007f04f674f1c978d0e325c9c7ce899cefb92c1.tar.xz
pam_wrapper-f007f04f674f1c978d0e325c9c7ce899cefb92c1.zip
cmake: Add link to compile database
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7d646da..94d7146 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -54,6 +54,10 @@ if (UNIT_TESTING)
add_subdirectory(tests)
endif (UNIT_TESTING)
+# Link compile database for clangd
+execute_process(COMMAND cmake -E create_symlink
+ "${CMAKE_BINARY_DIR}/compile_commands.json"
+ "${CMAKE_SOURCE_DIR}/compile_commands.json")
# pkg-config file
get_filename_component(PAM_WRAPPER_LIB ${PAM_WRAPPER_LOCATION} NAME)