This commit is contained in:
parent
b0810b80b7
commit
425a5524c4
1 changed files with 4 additions and 2 deletions
|
@ -6,7 +6,8 @@ execute_process(COMMAND bash "-c" "git rev-parse HEAD" OUTPUT_VARIABLE GIT_HASH
|
||||||
execute_process(COMMAND bash "-c" "git tag -l --sort=refname 'v*' | tail -n1" OUTPUT_VARIABLE GIT_TAG OUTPUT_STRIP_TRAILING_WHITESPACE)
|
execute_process(COMMAND bash "-c" "git tag -l --sort=refname 'v*' | tail -n1" OUTPUT_VARIABLE GIT_TAG OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
execute_process(COMMAND bash "-c" "git rev-list -n 1 ${GIT_TAG}" OUTPUT_VARIABLE GIT_TAG_HASH OUTPUT_STRIP_TRAILING_WHITESPACE)
|
execute_process(COMMAND bash "-c" "git rev-list -n 1 ${GIT_TAG}" OUTPUT_VARIABLE GIT_TAG_HASH OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
message(STATUS "${GIT_HASH}")
|
message(STATUS "${GIT_HASH}")
|
||||||
if(DEFINED RUN_PIPELINE)
|
option(RUN_PIPELINE "" OFF)
|
||||||
|
if(RUN_PIPELINE)
|
||||||
set(VERSION "v0.0.0-test")
|
set(VERSION "v0.0.0-test")
|
||||||
else()
|
else()
|
||||||
message(STATUS "${GIT_TAG}")
|
message(STATUS "${GIT_TAG}")
|
||||||
|
@ -17,6 +18,7 @@ else()
|
||||||
set(VERSION "${VERSION}-${GIT_HASH_SHORT}")
|
set(VERSION "${VERSION}-${GIT_HASH_SHORT}")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
message(STATUS "version = ${VERSION}")
|
||||||
|
|
||||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 7.0)
|
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 7.0)
|
||||||
|
|
Loading…
Reference in a new issue