summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-05-17 17:34:29 (GMT)
committerBrad King <brad.king@kitware.com>2010-05-17 17:34:29 (GMT)
commit3ebb41d58ae4d791f39a2f65d7dbe5fc2d3ddff3 (patch)
tree746999c765846c5978e8a5be682c561c0db6cda6 /CMakeLists.txt
parent0559c4e04e002555dd09a57b41e4d83645a82f37 (diff)
parentc70fcf64aba77443bdb8bef3a62886c29a112df2 (diff)
downloadCMake-3ebb41d58ae4d791f39a2f65d7dbe5fc2d3ddff3.zip
CMake-3ebb41d58ae4d791f39a2f65d7dbe5fc2d3ddff3.tar.gz
CMake-3ebb41d58ae4d791f39a2f65d7dbe5fc2d3ddff3.tar.bz2
Merge branch 'version'
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt35
1 files changed, 26 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4cd11c4..352c1c5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -339,18 +339,35 @@ ENDMACRO (CMAKE_BUILD_UTILITIES)
SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 9)
SET(CMake_VERSION_PATCH 0)
+#SET(CMake_VERSION_TWEAK 0)
-# We use odd minor numbers for development versions.
-# Use a date for the development patch level.
-IF("${CMake_VERSION_MINOR}" MATCHES "[13579]$")
+# 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)
+
+ # Use the date as the tweak level.
INCLUDE(${CMake_SOURCE_DIR}/Source/kwsys/kwsysDateStamp.cmake)
- SET(CMake_VERSION_PATCH
+ SET(CMake_VERSION_TWEAK
"${KWSYS_DATE_STAMP_YEAR}${KWSYS_DATE_STAMP_MONTH}${KWSYS_DATE_STAMP_DAY}"
)
-ENDIF("${CMake_VERSION_MINOR}" MATCHES "[13579]$")
-SET(CMake_VERSION "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
-SET(CMake_VERSION_FULL "${CMake_VERSION}.${CMake_VERSION_PATCH}")
+ INCLUDE(${CMake_SOURCE_DIR}/Source/CMakeVersionSource.cmake)
+ENDIF()
+
+# Compute the full version string.
+SET(CMake_VERSION ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH})
+IF(${CMake_VERSION_TWEAK} GREATER 0)
+ SET(CMake_VERSION ${CMake_VERSION}.${CMake_VERSION_TWEAK})
+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()
@@ -370,9 +387,9 @@ SET(LIBRARY_OUTPUT_PATH "" CACHE INTERNAL
# install tree.
SET(CMAKE_SKIP_RPATH ON CACHE INTERNAL "CMake does not need RPATHs.")
-SET(CMAKE_DATA_DIR "/share/cmake-${CMake_VERSION}" CACHE STRING
+SET(CMAKE_DATA_DIR "/share/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}" CACHE STRING
"Install location for data (relative to prefix).")
-SET(CMAKE_DOC_DIR "/doc/cmake-${CMake_VERSION}" CACHE STRING
+SET(CMAKE_DOC_DIR "/doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}" CACHE STRING
"Install location for documentation (relative to prefix).")
SET(CMAKE_MAN_DIR "/man" CACHE STRING
"Install location for man pages (relative to prefix).")