diff options
| author | Christoph Berg <myon@debian.org> | 2026-09-26 23:24:03 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-09-26 23:24:03 +0200 |
| commit | 059831534c7e884f0a607ed86b582fd00d821731 (patch) | |
| tree | 76bcb67a78f8aa2654fd34c2ad801a62136b0170 /CMake/getsvn.cmake | |
| parent | d83a420f0517d7fc47aeb288a6a0cf4891784fcc (diff) | |
New upstream version 3.2.0~rc1+dfsgupstream/3.2.0_rc1+dfsg
Diffstat (limited to 'CMake/getsvn.cmake')
| -rw-r--r-- | CMake/getsvn.cmake | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/CMake/getsvn.cmake b/CMake/getsvn.cmake index 92b5b415..d6af3312 100644 --- a/CMake/getsvn.cmake +++ b/CMake/getsvn.cmake @@ -65,7 +65,7 @@ elseif (EXISTS "${SOURCE_DIR}/.git") message (STATUS "Source tree based on revision ${GIT_REFSPEC} ${SCS_VERSION} appears to have local changes") file (APPEND ${__scs_header_file} "#define SCS_VERSION_IS_DIRTY 1\n") set (SCS_VERSION_STR "${SCS_VERSION}-dirty") - execute_process (COMMAND ${GIT_EXECUTABLE} --git-dir=${SOURCE_DIR}/.git --work-tree=${SOURCE_DIR} status + execute_process (COMMAND ${GIT_EXECUTABLE} -C ${SOURCE_DIR} status ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) else () @@ -74,7 +74,13 @@ elseif (EXISTS "${SOURCE_DIR}/.git") message (STATUS "refspec: ${GIT_REFSPEC} - SHA1: ${SCS_VERSION}") endif () else() - message (STATUS "No SCS found") + if (SOURCE_REVISION) + string (SUBSTRING "${SOURCE_REVISION}" 0 6 SCS_VERSION) + set (SCS_VERSION_STR "${SCS_VERSION}") + message (STATUS "Using archived source revision ${SCS_VERSION}") + else () + message (STATUS "No SCS found") + endif () endif () file (APPEND ${__scs_header_file} "#define SCS_VERSION ${SCS_VERSION}\n") file (APPEND ${__scs_header_file} "#define SCS_VERSION_STR \"${SCS_VERSION_STR}\"\n") |
