summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2016-10-16 18:56:36 (GMT)
committerBrad King <brad.king@kitware.com>2016-10-17 14:02:17 (GMT)
commite8bafb6fcbb46bad4dfcb8dab1347c8e5f9a8090 (patch)
treef32ddffe7ba60630b98eae6d3bd5cef85f2a7609
parentb99bbfe88d1bb02dc903507f3e1bbe716ac04c12 (diff)
downloadCMake-e8bafb6fcbb46bad4dfcb8dab1347c8e5f9a8090.zip
CMake-e8bafb6fcbb46bad4dfcb8dab1347c8e5f9a8090.tar.gz
CMake-e8bafb6fcbb46bad4dfcb8dab1347c8e5f9a8090.tar.bz2
OS X: Do not try to set deployment target when cross-compiling
The change in commit v3.4.0-rc2~6^2 (Xcode: Adjust deployment target SDK version to host version, 2015-10-11) does not make sense when cross-compiling. Make it conditional to fix this regression in some cross-compiling cases. Closes: #16355
-rw-r--r--Modules/Platform/Darwin-Initialize.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/Platform/Darwin-Initialize.cmake b/Modules/Platform/Darwin-Initialize.cmake
index 427909d..39374e1 100644
--- a/Modules/Platform/Darwin-Initialize.cmake
+++ b/Modules/Platform/Darwin-Initialize.cmake
@@ -90,7 +90,7 @@ elseif("${CMAKE_GENERATOR}" MATCHES Xcode
endif()
endforeach()
- if(NOT CMAKE_OSX_DEPLOYMENT_TARGET AND _CURRENT_OSX_VERSION VERSION_LESS _CMAKE_OSX_DEPLOYMENT_TARGET)
+ if(NOT CMAKE_CROSSCOMPILING AND NOT CMAKE_OSX_DEPLOYMENT_TARGET AND _CURRENT_OSX_VERSION VERSION_LESS _CMAKE_OSX_DEPLOYMENT_TARGET)
set(CMAKE_OSX_DEPLOYMENT_TARGET ${_CURRENT_OSX_VERSION} CACHE STRING
"Minimum OS X version to target for deployment (at runtime); newer APIs weak linked. Set to empty string for default value." FORCE)
endif()