parent
d4003c0a88
commit
9bae63205c
|
@ -12,13 +12,8 @@ if ("${GIT_TAG}" STREQUAL "")
|
||||||
STRING(TIMESTAMP COMPILE_TIME %Y-%m-%d_%H:%M:%S)
|
STRING(TIMESTAMP COMPILE_TIME %Y-%m-%d_%H:%M:%S)
|
||||||
SET(GIT_VERSION ${COMPILE_TIME})
|
SET(GIT_VERSION ${COMPILE_TIME})
|
||||||
else ()
|
else ()
|
||||||
EXECUTE_PROCESS(COMMAND git rev-parse --short HEAD
|
|
||||||
OUTPUT_VARIABLE GIT_HASH)
|
|
||||||
|
|
||||||
STRING(REGEX REPLACE "\n$" "" GIT_TAG ${GIT_TAG})
|
STRING(REGEX REPLACE "\n$" "" GIT_TAG ${GIT_TAG})
|
||||||
STRING(REGEX REPLACE "\n$" "" GIT_HASH ${GIT_HASH})
|
SET(GIT_VERSION ${GIT_TAG})
|
||||||
|
|
||||||
SET(GIT_VERSION ${GIT_TAG}_${GIT_HASH})
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue