diff --git a/cmake/GitVersion.cmake b/cmake/GitVersion.cmake index 0ea32a4e..f4f340e4 100644 --- a/cmake/GitVersion.cmake +++ b/cmake/GitVersion.cmake @@ -1,5 +1,5 @@ -execute_process(COMMAND git describe --always OUTPUT_VARIABLE GIT_VERSION) -string(STRIP ${GIT_VERSION} GIT_VERSION) +execute_process(COMMAND git describe --always OUTPUT_VARIABLE GIT_DESC) +string(STRIP ${GIT_DESC} GIT_DESC) configure_file(${INPUT_FILE} ${OUTPUT_FILE}) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index eb810b7b..52fd9936 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -1,7 +1,7 @@ FetchContent_MakeAvailable(boostpfr) -if (GIT_VERSION) +if (GIT_DESC) configure_file(version.cpp.in version.cpp) else () add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.cpp diff --git a/common/version.cpp.in b/common/version.cpp.in index fa6970f3..e9db04a2 100644 --- a/common/version.cpp.in +++ b/common/version.cpp.in @@ -19,4 +19,4 @@ #include "version.h" -const char git_version[] = "@GIT_VERSION@"; +const char git_version[] = "@GIT_DESC@";