summaryrefslogtreecommitdiffstats
path: root/bootstrap
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-04-20 15:20:48 (GMT)
committerBrad King <brad.king@kitware.com>2012-04-20 15:25:55 (GMT)
commit0c7029c6420d6387b74a85bb8e62194e80b4e879 (patch)
tree32cf9f5b3d8c1098c06712930cfc890c8bbf73dd /bootstrap
parent20ba4fe1bf3d753ecc6f482aeb922582a6b99a1f (diff)
downloadCMake-0c7029c6420d6387b74a85bb8e62194e80b4e879.zip
CMake-0c7029c6420d6387b74a85bb8e62194e80b4e879.tar.gz
CMake-0c7029c6420d6387b74a85bb8e62194e80b4e879.tar.bz2
Refactor CMake version handling
Move the CMake version number components out of "CMakeLists.txt" into dedicated file "Source/CMakeVersion.cmake". Set the TWEAK level to the date explicitly. Add a "Source/CMakeVersion.bash" script to update the date, thus replacing KWSys DateStamp for CMake. Teach the bootstrap script to extract the version components from their new location.
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap12
1 files changed, 1 insertions, 11 deletions
diff --git a/bootstrap b/bootstrap
index 3be3d1f..0069754 100755
--- a/bootstrap
+++ b/bootstrap
@@ -18,18 +18,11 @@ die() {
# Version number extraction function.
cmake_version_component()
{
- cat "${cmake_source_dir}/CMakeLists.txt" | sed -n "
+ cat "${cmake_source_dir}/Source/CMakeVersion.cmake" | sed -n "
/^SET(CMake_VERSION_${1}/ {s/SET(CMake_VERSION_${1} *\([0-9]*\))/\1/;p;}
"
}
-cmake_date_stamp_component()
-{
- cat "${cmake_source_dir}/Source/kwsys/kwsysDateStamp.cmake" | sed -n "
-/KWSYS_DATE_STAMP_${1}/ {s/^.* \([0-9][0-9]*\))$/\1/;p;}
-"
-}
-
cmake_toupper()
{
echo "$1" | sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'
@@ -46,9 +39,6 @@ cmake_version_minor="`cmake_version_component MINOR`"
cmake_version_patch="`cmake_version_component PATCH`"
cmake_version="${cmake_version_major}.${cmake_version_minor}.${cmake_version_patch}"
cmake_version_tweak="`cmake_version_component TWEAK`"
-if [ "x$cmake_version_tweak" = "x" ]; then
- cmake_version_tweak="`cmake_date_stamp_component YEAR``cmake_date_stamp_component MONTH``cmake_date_stamp_component DAY`"
-fi
if [ "$cmake_version_tweak" != "0" ]; then
cmake_version="${cmake_version}.${cmake_version_tweak}"
fi