From 05da09d070da026ede13fa7c69170ab05b899a87 Mon Sep 17 00:00:00 2001 From: collecting Date: Sat, 25 Oct 2025 01:05:44 +0000 Subject: [PATCH] Edit GenerateSCMRev.cmake --- CMakeModules/GenerateSCMRev.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeModules/GenerateSCMRev.cmake b/CMakeModules/GenerateSCMRev.cmake index 3f5ce0f34..a568e4ea3 100644 --- a/CMakeModules/GenerateSCMRev.cmake +++ b/CMakeModules/GenerateSCMRev.cmake @@ -53,4 +53,11 @@ if (BUILD_REPOSITORY) endif() endif() +# Add a fallback for local builds +# If BUILD_VERSION is still "0", it means the CI-specific logic was not executed. +# In that case, we should use the git description which contains the commit hash. +if (BUILD_VERSION STREQUAL "0") + set(BUILD_VERSION ${GIT_DESC}) +endif() + configure_file(scm_rev.cpp.in scm_rev.cpp @ONLY)