summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2009-02-17 21:59:58 (GMT)
committerDavid Cole <david.cole@kitware.com>2009-02-17 21:59:58 (GMT)
commit553ddde8d10a5fd7d553a2efd50c15da181f6ada (patch)
treef008eb8dbddc3c8a5b355d8c68adefddf687ea50 /Modules
parentab629e28f334071784b6009a046b3be441f39349 (diff)
downloadCMake-553ddde8d10a5fd7d553a2efd50c15da181f6ada.zip
CMake-553ddde8d10a5fd7d553a2efd50c15da181f6ada.tar.gz
CMake-553ddde8d10a5fd7d553a2efd50c15da181f6ada.tar.bz2
BUG: Allow third component of Mac OSX sw_vers output to be empty. Mac OSX 10.5 was recently reinstalled on dashmacmini3 and pointed out the fact that this expression is faulty when the reported version is simply 10.5 rather than 10.5.x... for example. This fixes it.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Platform/Darwin.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index 6e67f20..81f33e1 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -74,7 +74,7 @@ ENDIF(NOT _CMAKE_OSX_SDKS)
# Set CMAKE_OSX_DEPLOYMENT_TARGET_DEFAULT to the current version of OS X
EXECUTE_PROCESS(COMMAND sw_vers -productVersion OUTPUT_VARIABLE CURRENT_OSX_VERSION)
-STRING(REGEX REPLACE "^.*(10)\\.([0-9]+)\\.([0-9]+).*$" "\\1.\\2"
+STRING(REGEX REPLACE "^.*(10)\\.([0-9]+)\\.*([0-9]+)*.*$" "\\1.\\2"
CMAKE_OSX_DEPLOYMENT_TARGET_DEFAULT ${CURRENT_OSX_VERSION})
# Set CMAKE_OSX_SYSROOT_DEFAULT based on CMAKE_OSX_DEPLOYMENT_TARGET_DEFAULT.