summaryrefslogtreecommitdiffstats
path: root/bootstrap
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-10-25 12:55:50 (GMT)
committerBrad King <brad.king@kitware.com>2013-10-25 13:01:37 (GMT)
commit1093deebd0bd561f06419b84133620e9473b17e4 (patch)
tree1742af8c1ef007d9434fe9481e62a701a36ccbf4 /bootstrap
parent8c0bbd37df52900678b3a85b146d7a7f65cba374 (diff)
downloadCMake-1093deebd0bd561f06419b84133620e9473b17e4.zip
CMake-1093deebd0bd561f06419b84133620e9473b17e4.tar.gz
CMake-1093deebd0bd561f06419b84133620e9473b17e4.tar.bz2
Shorten CMake version used in install destinations
Since commit c9a5f34b (Cleanup use of CMake version in install destinations, 2013-09-26) we use the full CMake version in default install destinations. For rapidly changing versions of the form <major>.<minor>.<patch>.<date>-g<commit>[-dirty] used by developers this is too granular. Instead use just <major>.<minor>.<patch> as the version for default install destinations. This will still be granular enough for unique directories in releases. On Cygwin continue to use the full ${CMake_VERSION} as was the case prior to the above-mentioned commit.
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap8
1 files changed, 7 insertions, 1 deletions
diff --git a/bootstrap b/bootstrap
index 2e455d7..2d44d67 100755
--- a/bootstrap
+++ b/bootstrap
@@ -28,7 +28,13 @@ cmake_install_dest_default()
{
cat "${cmake_source_dir}/Source/CMakeInstallDestinations.cmake" | sed -n '
/^ *set(CMAKE_'"${1}"'_DIR_DEFAULT.*) # '"${2}"'$/ {
- s/^ *set(CMAKE_'"${1}"'_DIR_DEFAULT *"\([^"]*\)").*$/\1/;p;q;}
+ s/^ *set(CMAKE_'"${1}"'_DIR_DEFAULT *"\([^"]*\)").*$/\1/
+ s/${CMake_VERSION_MAJOR}/'"${cmake_version_major}"'/
+ s/${CMake_VERSION_MINOR}/'"${cmake_version_minor}"'/
+ s/${CMake_VERSION_PATCH}/'"${cmake_version_patch}"'/
+ p
+ q
+}
'
}