diff options
author | Brad King <brad.king@kitware.com> | 2016-02-19 14:28:27 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-02-19 14:28:27 (GMT) |
commit | d8cba5368bd58c6113abd8617fe264579e97b48a (patch) | |
tree | 3783c384794065dad85d8601daaf6dbf5690b975 /Tests/CMakeLists.txt | |
parent | 29c266eb56e4e17894574f8a838a372f809d671e (diff) | |
download | CMake-d8cba5368bd58c6113abd8617fe264579e97b48a.zip CMake-d8cba5368bd58c6113abd8617fe264579e97b48a.tar.gz CMake-d8cba5368bd58c6113abd8617fe264579e97b48a.tar.bz2 |
Tests: Fix XCTest when ENV{SDKROOT} is set
We use the host OS X version as the deployment target for this test.
This breaks if the SDKROOT environment variable specifies an
incompatible SDK version. Explicitly specify `macosx` as the
SDK so that CMake will automatically select a version matching
the deployment target.
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r-- | Tests/CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 7bb0721..b43275a 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1644,7 +1644,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release if(CMake_TEST_XCODE_VERSION AND NOT CMake_TEST_XCODE_VERSION VERSION_LESS 5 AND OSX_VERSION MATCHES "^([0-9]+\\.[0-9]+)") - set(XCTest_BUILD_OPTIONS -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_MATCH_1}) + set(XCTest_BUILD_OPTIONS -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_MATCH_1} -DCMAKE_OSX_SYSROOT=macosx) ADD_TEST_MACRO(XCTest ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> -V) endif() |