summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2022-08-21 01:24:39 (GMT)
committerBrad King <brad.king@kitware.com>2022-09-22 13:24:47 (GMT)
commitd6b708482ff88ff5a15f28b2c0e17ccf09c812b0 (patch)
treebb5c0561c56b6f94220066f8b36fb1d249aa6889
parent4ff86046048882487d582cf463ce49b0f708223c (diff)
downloadCMake-d6b708482ff88ff5a15f28b2c0e17ccf09c812b0.zip
CMake-d6b708482ff88ff5a15f28b2c0e17ccf09c812b0.tar.gz
CMake-d6b708482ff88ff5a15f28b2c0e17ccf09c812b0.tar.bz2
CMakeVersion.cmake: `set(VAR "${VAR}…")` → `string(APPEND VAR "…")`
-rw-r--r--Source/CMakeVersion.cmake8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 81d2cb0..1b9ae10 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -9,7 +9,7 @@ set(CMake_VERSION_IS_DIRTY 0)
set(CMake_VERSION
"${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}")
if(DEFINED CMake_VERSION_RC)
- set(CMake_VERSION "${CMake_VERSION}-rc${CMake_VERSION_RC}")
+ string(APPEND CMake_VERSION "-rc${CMake_VERSION_RC}")
endif()
# Releases define a small patch level.
@@ -53,7 +53,7 @@ if(NOT CMake_VERSION_NO_GIT)
# If this is not the exact commit of a release, add dev info.
if(NOT "${git_subject}" MATCHES "^[Cc][Mm]ake ${CMake_VERSION}$")
- set(CMake_VERSION "${CMake_VERSION}-g${git_hash}")
+ string(APPEND CMake_VERSION "-g${git_hash}")
endif()
# If this is a work tree, check whether it is dirty.
@@ -68,7 +68,7 @@ if(NOT CMake_VERSION_NO_GIT)
# No commit information.
if(NOT CMake_VERSION_IS_RELEASE)
# Generic development version.
- set(CMake_VERSION "${CMake_VERSION}-git")
+ string(APPEND CMake_VERSION "-git")
endif()
endif()
endif()
@@ -80,5 +80,5 @@ else()
set(CMake_VERSION_SUFFIX "")
endif()
if(CMake_VERSION_IS_DIRTY)
- set(CMake_VERSION ${CMake_VERSION}-dirty)
+ string(APPEND CMake_VERSION "-dirty")
endif()