File tree 1 file changed +11
-2
lines changed
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 3
3
if (VERSION_EXTRA)
4
4
set (VERSION_GITHASH "${VERSION_STRING} " )
5
5
else ()
6
- execute_process (COMMAND git describe --always -- tag --dirty
6
+ execute_process (COMMAND git describe --tag --dirty
7
7
WORKING_DIRECTORY "${GENERATE_VERSION_SOURCE_DIR} "
8
8
OUTPUT_VARIABLE VERSION_GITHASH OUTPUT_STRIP_TRAILING_WHITESPACE
9
9
ERROR_QUIET)
10
10
11
11
if (VERSION_GITHASH)
12
12
message (STATUS "*** Detected Git version ${VERSION_GITHASH} ***" )
13
13
else ()
14
- set (VERSION_GITHASH "${VERSION_STRING} " )
14
+ execute_process (COMMAND git describe --always --tag --dirty
15
+ WORKING_DIRECTORY "${GENERATE_VERSION_SOURCE_DIR} "
16
+ OUTPUT_VARIABLE VERSION_GITHASH OUTPUT_STRIP_TRAILING_WHITESPACE
17
+ ERROR_QUIET)
18
+ if (VERSION_GITHASH)
19
+ set (VERSION_GITHASH "${VERSION_STRING} -${VERSION_GITHASH} " )
20
+ message (STATUS "*** Detected shallow Git version ${VERSION_GITHASH} ***" )
21
+ else ()
22
+ set (VERSION_GITHASH "${VERSION_STRING} " )
23
+ endif ()
15
24
endif ()
16
25
endif ()
17
26
You can’t perform that action at this time.
0 commit comments