From caf38725ae2802bdc71ea45c40c34635c5090dca Mon Sep 17 00:00:00 2001 From: Andrew Udvare Date: Mon, 20 Dec 2021 19:13:07 -0500 Subject: Allow overriding SCM version info If the build is from a non-repository, these functions will return empty. This patch allows using defines to CMake to set version info such as -DGIT_BRANCH=master. --- src/common/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/common') diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 919da4a53..790193b00 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -22,6 +22,11 @@ add_custom_command(OUTPUT scm_rev.cpp -DTITLE_BAR_FORMAT_RUNNING=${TITLE_BAR_FORMAT_RUNNING} -DBUILD_TAG=${BUILD_TAG} -DBUILD_ID=${DISPLAY_VERSION} + -DGIT_REF_SPEC=${GIT_REF_SPEC} + -DGIT_REV=${GIT_REV} + -DGIT_DESC=${GIT_DESC} + -DGIT_BRANCH=${GIT_BRANCH} + -DBUILD_FULLNAME=${BUILD_FULLNAME} -DGIT_EXECUTABLE=${GIT_EXECUTABLE} -P ${CMAKE_SOURCE_DIR}/CMakeModules/GenerateSCMRev.cmake DEPENDS -- cgit v1.2.3