We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0ed764e + 8615731 commit 6850bc2Copy full SHA for 6850bc2
cmake/modules/CTags.cmake
@@ -3,13 +3,14 @@ find_program(CTAGS_EXECUTABLE ctags)
3
function(add_tags name)
4
cmake_parse_arguments(TAGS "" "SRC_DIR;TAG_FILE" "EXCLUDE_OPTS;EXCLUDES" ${ARGN})
5
set(excludes ${TAGS_EXCLUDES})
6
+ find_package(Git)
7
if(TAGS_EXCLUDE_OPTS)
8
# always respect EXCLUDES_OPTS
9
list(APPEND excludes ${TAGS_EXCLUDE_OPTS})
- else()
10
+ elseif(Git_FOUND)
11
# exclude the submodules under SRC_DIR by default
12
execute_process(
- COMMAND git config --file .gitmodules --get-regexp path
13
+ COMMAND ${GIT_EXECUTABLE} config --file .gitmodules --get-regexp path
14
COMMAND awk "/${TAGS_SRC_DIR}/ { print $2 }"
15
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
16
RESULT_VARIABLE result_code
0 commit comments