summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2020-08-13 15:59:35 (GMT)
committerGregor Jasny <gjasny@googlemail.com>2020-08-13 16:05:34 (GMT)
commit862dbe1367ed123b0a6eb8171bae0064fd7fa79f (patch)
tree12b71e9fcb7891140e33f8a4c185d67ca3626bdb /Tests/RunCMake
parent5748e76639822bf330986b0b77da6fd70f3de301 (diff)
downloadCMake-862dbe1367ed123b0a6eb8171bae0064fd7fa79f.zip
CMake-862dbe1367ed123b0a6eb8171bae0064fd7fa79f.tar.gz
CMake-862dbe1367ed123b0a6eb8171bae0064fd7fa79f.tar.bz2
Xcode: Link matching zlib for iOS Simulator SDK
The XcodeRemoveExcessiveISystem test runs `find_package(ZLIB)` which returns an SDK-relative path to `zlib.tlb`. When the test switches the SDK for building to something different than the SDK used for configuration the linker rightfully complains about the mismatch. The fix is to configure and build with the same SDK.
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/XcodeProject/RunCMakeTest.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
index cd6fd06..ed300bb 100644
--- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
+++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
@@ -310,10 +310,10 @@ endif()
if(XCODE_VERSION VERSION_GREATER_EQUAL 8)
function(XcodeRemoveExcessiveISystemSDK SDK)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeRemoveExcessiveISystemSDK-${SDK}-build)
- set(RunCMake_TEST_OPTIONS "-DCMAKE_SYSTEM_NAME=iOS")
+ set(RunCMake_TEST_OPTIONS "-DCMAKE_SYSTEM_NAME=iOS" "-DCMAKE_OSX_SYSROOT=${SDK}")
run_cmake(XcodeRemoveExcessiveISystem)
set(RunCMake_TEST_NO_CLEAN 1)
- run_cmake_command(XcodeRemoveExcessiveISystemSDK-${SDK}-build ${CMAKE_COMMAND} --build . -- -sdk ${SDK})
+ run_cmake_command(XcodeRemoveExcessiveISystemSDK-${SDK}-build ${CMAKE_COMMAND} --build .)
endfunction()
XcodeRemoveExcessiveISystemSDK(iphoneos)