Mark package release's version string (#317)

This commit is contained in:
Michael Legleux
2022-10-04 07:02:32 -07:00
committed by GitHub
parent 37f9493d15
commit de23f015d6
2 changed files with 8 additions and 1 deletions

View File

@@ -20,7 +20,7 @@ if(NOT GIT_COMMIT_HASH)
endif()
find_package(Git)
if(Git_FOUND)
execute_process(COMMAND ${GIT_EXECUTABLE} describe --always --abbrev=8
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE gch)
if(gch)
set(GIT_COMMIT_HASH "${gch}")
@@ -29,6 +29,10 @@ if(NOT GIT_COMMIT_HASH)
endif()
endif()
endif() #git
if(PACKAGING)
add_definitions(-DPKG=1)
endif()
add_library(clio)
target_compile_features(clio PUBLIC cxx_std_20)

View File

@@ -31,6 +31,9 @@ char const* const versionString = "1.0.2"
#ifdef SANITIZER
BOOST_PP_STRINGIZE(SANITIZER)
#endif
#endif
#ifdef PKG
"-release"
#endif
//--------------------------------------------------------------------------