summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@macports.org>2014-07-20 03:43:20 (GMT)
committerBrad King <brad.king@kitware.com>2014-07-28 13:52:21 (GMT)
commit5b4faeefe36fd775fd60f98aedf0cc35202f99f4 (patch)
tree59649bea2f34ba7636cd6d1e4821a66ae00116f4 /Modules/Platform
parenta971de3adf5f89cbbc37c492f1a53d1790d23729 (diff)
downloadCMake-5b4faeefe36fd775fd60f98aedf0cc35202f99f4.zip
CMake-5b4faeefe36fd775fd60f98aedf0cc35202f99f4.tar.gz
CMake-5b4faeefe36fd775fd60f98aedf0cc35202f99f4.tar.bz2
OS X: Allow deployment target with "/" sysroot (#15040)
Allow the combination -DCMAKE_OSX_DEPLOYMENT_TARGET="10.8" -DCMAKE_OSX_SYSROOT="/" to work. Treat the "/" sysroot as targeting the current OS X version.
Diffstat (limited to 'Modules/Platform')
-rw-r--r--Modules/Platform/Darwin.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index e25df1e..e5c5f36 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -70,6 +70,8 @@ if(CMAKE_OSX_DEPLOYMENT_TARGET)
set(_sdk_ver "${CMAKE_MATCH_1}")
elseif("${_CMAKE_OSX_SYSROOT_ORIG}" MATCHES "^macosx([0-9]+\\.[0-9]+)$")
set(_sdk_ver "${CMAKE_MATCH_1}")
+ elseif("${_CMAKE_OSX_SYSROOT_ORIG}" STREQUAL "/")
+ set(_sdk_ver "${_CURRENT_OSX_VERSION}")
else()
message(FATAL_ERROR
"CMAKE_OSX_DEPLOYMENT_TARGET is '${CMAKE_OSX_DEPLOYMENT_TARGET}' "