use GIT_DESC for version identifier
This commit is contained in:
committed by
Guillaume Meunier
parent
8b1f662b65
commit
5c11ae256a
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
execute_process(COMMAND git describe --always OUTPUT_VARIABLE GIT_VERSION)
|
execute_process(COMMAND git describe --always OUTPUT_VARIABLE GIT_DESC)
|
||||||
string(STRIP ${GIT_VERSION} GIT_VERSION)
|
string(STRIP ${GIT_DESC} GIT_DESC)
|
||||||
|
|
||||||
configure_file(${INPUT_FILE} ${OUTPUT_FILE})
|
configure_file(${INPUT_FILE} ${OUTPUT_FILE})
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
FetchContent_MakeAvailable(boostpfr)
|
FetchContent_MakeAvailable(boostpfr)
|
||||||
|
|
||||||
if (GIT_VERSION)
|
if (GIT_DESC)
|
||||||
configure_file(version.cpp.in version.cpp)
|
configure_file(version.cpp.in version.cpp)
|
||||||
else ()
|
else ()
|
||||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.cpp
|
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.cpp
|
||||||
|
|||||||
@@ -19,4 +19,4 @@
|
|||||||
|
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
const char git_version[] = "@GIT_VERSION@";
|
const char git_version[] = "@GIT_DESC@";
|
||||||
|
|||||||
Reference in New Issue
Block a user