summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-04-23 14:01:49 (GMT)
committerBrad King <brad.king@kitware.com>2010-04-23 14:01:49 (GMT)
commit0328379411386abc89ba07991f858cdacca926b2 (patch)
tree72dd2d12ced1daa4f2dc1b182089c934e01fdb34 /CMakeLists.txt
parente49b6eca4f5857bcf7bfc08e34d0797a3400bcf2 (diff)
downloadCMake-0328379411386abc89ba07991f858cdacca926b2.zip
CMake-0328379411386abc89ba07991f858cdacca926b2.tar.gz
CMake-0328379411386abc89ba07991f858cdacca926b2.tar.bz2
Report commit hash in CMake development versions
For builds from Git repositories, add "-g<commit>" to the end of the version number. If the source tree is modified, append "-dirty". For builds from CVS checkouts, add "-cvs-<branch>".
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f56beb3..352c1c5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -344,6 +344,7 @@ SET(CMake_VERSION_PATCH 0)
# Releases define a tweak level.
IF(DEFINED CMake_VERSION_TWEAK)
SET(CMake_VERSION_IS_RELEASE 1)
+ SET(CMake_VERSION_SOURCE "")
ELSE()
SET(CMake_VERSION_IS_RELEASE 0)
@@ -352,6 +353,8 @@ ELSE()
SET(CMake_VERSION_TWEAK
"${KWSYS_DATE_STAMP_YEAR}${KWSYS_DATE_STAMP_MONTH}${KWSYS_DATE_STAMP_DAY}"
)
+
+ INCLUDE(${CMake_SOURCE_DIR}/Source/CMakeVersionSource.cmake)
ENDIF()
# Compute the full version string.
@@ -362,6 +365,9 @@ ENDIF()
IF(CMake_VERSION_RC)
SET(CMake_VERSION ${CMake_VERSION}-rc${CMake_VERSION_RC})
ENDIF()
+IF(CMake_VERSION_SOURCE)
+ SET(CMake_VERSION ${CMake_VERSION}-${CMake_VERSION_SOURCE})
+ENDIF()
# Include the standard Dart testing module
ENABLE_TESTING()