summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-05-30 13:43:34 (GMT)
committerBrad King <brad.king@kitware.com>2017-05-30 13:44:13 (GMT)
commitbe55f069f926472369627a99c1b7b5d01aee47c5 (patch)
tree9c549d5e95c8f5fc4318f7029a6eb2b025f3537b /Tests/CMakeLists.txt
parentbd9ec9d1d07c4a24f537264e06c735c7a8b33810 (diff)
downloadCMake-be55f069f926472369627a99c1b7b5d01aee47c5.zip
CMake-be55f069f926472369627a99c1b7b5d01aee47c5.tar.gz
CMake-be55f069f926472369627a99c1b7b5d01aee47c5.tar.bz2
Tests: Fix XCTest build configuration
Build the test binaries with the same configuration in which they will be tested instead of the default Debug configuration. This fixes the test when run in a Release configuration.
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r--Tests/CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 335267a..21fe641 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1728,6 +1728,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_CTEST_OPTIONS --build-config $<CONFIGURATION>)
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()