mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-07-31 00:03:07 +03:00
cmake: Link compile database to source dir for clangd
See https://github.com/ycm-core/YouCompleteMe https://github.com/abingham/emacs-ycmd Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@ -4,6 +4,8 @@
|
|||||||
*.swp
|
*.swp
|
||||||
*~$
|
*~$
|
||||||
cscope.*
|
cscope.*
|
||||||
|
compile_commands.json
|
||||||
|
/.clangd
|
||||||
tags
|
tags
|
||||||
/build
|
/build
|
||||||
/obj*
|
/obj*
|
||||||
|
@ -205,6 +205,11 @@ endif (WITH_SYMBOL_VERSIONING AND ABIMAP_FOUND)
|
|||||||
|
|
||||||
add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source DEPENDS ${_SYMBOL_TARGET})
|
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 "********************************************")
|
||||||
message(STATUS "********** ${PROJECT_NAME} build options : **********")
|
message(STATUS "********** ${PROJECT_NAME} build options : **********")
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
|
|||||||
|
|
||||||
# SOURCE GENERATOR
|
# SOURCE GENERATOR
|
||||||
set(CPACK_SOURCE_GENERATOR "TXZ")
|
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}")
|
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
|
||||||
|
|
||||||
### NSIS INSTALLER
|
### NSIS INSTALLER
|
||||||
|
Reference in New Issue
Block a user