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.
This commit is contained in:
Brad King
2017-05-30 09:43:34 -04:00
parent bd9ec9d1d0
commit be55f069f9

View File

@@ -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()