summaryrefslogtreecommitdiff
path: root/Modules/Platform
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2016-10-31 10:25:38 +0100
committerBrad King <brad.king@kitware.com>2016-11-01 09:31:08 -0400
commit542d52f95e3540953113fc66dc7a7958b9c184de (patch)
treec5061a7a07a40caafc6f26e72bbf1c687f2f573a /Modules/Platform
parent876da11858ab6649bb088c4bb7758fc84910ba20 (diff)
downloadcmake-542d52f95e3540953113fc66dc7a7958b9c184de.tar.gz
Revert "Xcode: Convert maybe unversioned OSX sysroot into versioned SDK path"
Revert commit v3.7.0-rc1~48^2 (Xcode: Convert maybe unversioned OSX sysroot into versioned SDK path, 2016-09-25). The replacement of `else()` with `if(CMAKE_OSX_SYSROOT)` defeats the prior handling of `if("x${CMAKE_OSX_SYSROOT}" MATCHES "/")`. This causes the combination -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/ to not be honored and `-isysroot` to be emitted as a compiler flag universally. We will need another solution to the problem the now-reverted commit was meant to address. Closes: #16394
Diffstat (limited to 'Modules/Platform')
-rw-r--r--Modules/Platform/Darwin-Initialize.cmake6
1 files changed, 2 insertions, 4 deletions
diff --git a/Modules/Platform/Darwin-Initialize.cmake b/Modules/Platform/Darwin-Initialize.cmake
index 39374e154a..360614443b 100644
--- a/Modules/Platform/Darwin-Initialize.cmake
+++ b/Modules/Platform/Darwin-Initialize.cmake
@@ -125,10 +125,8 @@ if(CMAKE_OSX_SYSROOT)
set(_CMAKE_OSX_SYSROOT_ORIG "")
endif()
set(_CMAKE_OSX_SYSROOT_PATH "${CMAKE_OSX_SYSROOT}")
- endif()
-
- if(CMAKE_OSX_SYSROOT)
- # Transform the (maybe unversioned) sysroot into a versioned path.
+ else()
+ # Transform the sdk name into a path.
execute_process(
COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version Path
OUTPUT_VARIABLE _stdout