try to fix CMakeLists.txt
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Christian Zimmermann 2023-08-31 13:16:56 +02:00
parent b0810b80b7
commit 425a5524c4

View file

@ -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 rev-list -n 1 ${GIT_TAG}" OUTPUT_VARIABLE GIT_TAG_HASH OUTPUT_STRIP_TRAILING_WHITESPACE)
message(STATUS "${GIT_HASH}")
if(DEFINED RUN_PIPELINE)
option(RUN_PIPELINE "" OFF)
if(RUN_PIPELINE)
set(VERSION "v0.0.0-test")
else()
message(STATUS "${GIT_TAG}")
@ -17,7 +18,8 @@ else()
set(VERSION "${VERSION}-${GIT_HASH_SHORT}")
endif()
endif()
message(STATUS "version = ${VERSION}")
if(CMAKE_COMPILER_IS_GNUCXX)
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 7.0)
message(FATAL_ERROR "require gcc version >= 7.0")