From 5c11ae256ac7b1a19ee856cb9e926328cc9011c3 Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Sun, 13 Nov 2022 14:32:56 +0100 Subject: [PATCH] use GIT_DESC for version identifier --- cmake/GitVersion.cmake | 4 ++-- common/CMakeLists.txt | 2 +- common/version.cpp.in | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) 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@";