2021-07-09 01:14:17 +02:00
|
|
|
diff --git a/CMakeModules/GenerateSCMRev.cmake b/CMakeModules/GenerateSCMRev.cmake
|
|
|
|
--- a/CMakeModules/GenerateSCMRev.cmake
|
|
|
|
+++ b/CMakeModules/GenerateSCMRev.cmake
|
2021-12-22 21:27:20 +01:00
|
|
|
@@ -11,16 +11,16 @@ find_package(Git QUIET PATHS "${GIT_EXEC
|
|
|
|
|
2021-07-09 01:14:17 +02:00
|
|
|
# generate git/build information
|
|
|
|
include(GetGitRevisionDescription)
|
2021-12-22 21:27:20 +01:00
|
|
|
-if(NOT GIT_REF_SPEC)
|
|
|
|
- get_git_head_revision(GIT_REF_SPEC GIT_REV)
|
|
|
|
-endif()
|
|
|
|
-if(NOT GIT_DESC)
|
|
|
|
- git_describe(GIT_DESC --always --long --dirty)
|
|
|
|
-endif()
|
|
|
|
-if (NOT GIT_BRANCH)
|
|
|
|
- git_branch_name(GIT_BRANCH)
|
|
|
|
-endif()
|
2021-07-09 01:14:17 +02:00
|
|
|
-get_timestamp(BUILD_DATE)
|
2021-12-22 21:27:20 +01:00
|
|
|
+#if(NOT GIT_REF_SPEC)
|
|
|
|
+# get_git_head_revision(GIT_REF_SPEC GIT_REV)
|
|
|
|
+#endif()
|
|
|
|
+#if(NOT GIT_DESC)
|
|
|
|
+# git_describe(GIT_DESC --always --long --dirty)
|
|
|
|
+#endif()
|
|
|
|
+#if (NOT GIT_BRANCH)
|
|
|
|
+# git_branch_name(GIT_BRANCH)
|
|
|
|
+#endif()
|
2021-07-09 01:14:17 +02:00
|
|
|
+#get_timestamp(BUILD_DATE)
|
2021-12-22 21:27:20 +01:00
|
|
|
|
2021-07-09 01:14:17 +02:00
|
|
|
# Generate cpp with Git revision from template
|
|
|
|
# Also if this is a CI build, add the build name (ie: Nightly, Canary) to the scm_rev file as well
|
2021-12-22 21:27:20 +01:00
|
|
|
@@ -56,4 +56,5 @@ endif()
|
2021-07-30 06:25:50 +02:00
|
|
|
|
|
|
|
# The variable SRC_DIR must be passed into the script
|
|
|
|
# (since it uses the current build directory for all values of CMAKE_*_DIR)
|
|
|
|
+set(BUILD_FULLNAME "${BUILD_FULLNAME} ")
|
2021-07-09 01:14:17 +02:00
|
|
|
configure_file("${SRC_DIR}/src/common/scm_rev.cpp.in" "scm_rev.cpp" @ONLY)
|
|
|
|
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
|
|
|
|
--- a/src/common/CMakeLists.txt
|
|
|
|
+++ b/src/common/CMakeLists.txt
|
2021-12-22 21:27:20 +01:00
|
|
|
@@ -28,6 +28,7 @@
|
2021-07-09 01:14:17 +02:00
|
|
|
-DBUILD_TAG=${BUILD_TAG}
|
|
|
|
-DBUILD_ID=${DISPLAY_VERSION}
|
|
|
|
-DGIT_EXECUTABLE=${GIT_EXECUTABLE}
|
|
|
|
+ -DBUILD_DATE=${BUILD_DATE}
|
|
|
|
-P ${CMAKE_SOURCE_DIR}/CMakeModules/GenerateSCMRev.cmake
|
|
|
|
DEPENDS
|
|
|
|
# WARNING! It was too much work to try and make a common location for this list,
|