mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-09 20:29:27 +00:00
cmake: generate tags
This commit is contained in:
parent
86a459a843
commit
e632f68789
@ -49,6 +49,7 @@ OPTION (BUILD_SHARED_LIBS "Build Shared Library (OFF for Static)" ON)
|
|||||||
OPTION (THREADSAFE "Build libgit2 as threadsafe" OFF)
|
OPTION (THREADSAFE "Build libgit2 as threadsafe" OFF)
|
||||||
OPTION (BUILD_TESTS "Build Tests" ON)
|
OPTION (BUILD_TESTS "Build Tests" ON)
|
||||||
OPTION (BUILD_CLAY "Build Tests using the Clay suite" OFF)
|
OPTION (BUILD_CLAY "Build Tests using the Clay suite" OFF)
|
||||||
|
OPTION (TAGS "Generate tags" OFF)
|
||||||
|
|
||||||
# Platform specific compilation flags
|
# Platform specific compilation flags
|
||||||
IF (MSVC)
|
IF (MSVC)
|
||||||
@ -168,3 +169,22 @@ IF (BUILD_CLAY)
|
|||||||
ENABLE_TESTING()
|
ENABLE_TESTING()
|
||||||
ADD_TEST(libgit2_clay libgit2_clay)
|
ADD_TEST(libgit2_clay libgit2_clay)
|
||||||
ENDIF ()
|
ENDIF ()
|
||||||
|
|
||||||
|
IF (TAGS)
|
||||||
|
FIND_PROGRAM(CTAGS ctags)
|
||||||
|
IF (NOT CTAGS)
|
||||||
|
message(FATAL_ERROR "Could not find ctags command")
|
||||||
|
ENDIF ()
|
||||||
|
|
||||||
|
FILE(GLOB_RECURSE SRC_ALL *.[ch])
|
||||||
|
|
||||||
|
ADD_CUSTOM_COMMAND(
|
||||||
|
OUTPUT tags
|
||||||
|
COMMAND ${CTAGS} -a ${SRC_ALL}
|
||||||
|
DEPENDS ${SRC_ALL}
|
||||||
|
)
|
||||||
|
ADD_CUSTOM_TARGET(
|
||||||
|
do_tags ALL
|
||||||
|
DEPENDS tags
|
||||||
|
)
|
||||||
|
ENDIF ()
|
||||||
|
Loading…
Reference in New Issue
Block a user