diff options
author | Gregor Jasny <gjasny@googlemail.com> | 2016-03-25 21:20:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-03-28 13:23:35 (GMT) |
commit | a364d2513a3fac76cf12cf3db21b7e9600ac51a4 (patch) | |
tree | 9253d9ebb7a27a92bf786cd3d6f734a7b13a804e /Modules/FindXCTest.cmake | |
parent | 64130a7e793483e24c1d68bdd234f81d5edb2d51 (diff) | |
download | CMake-a364d2513a3fac76cf12cf3db21b7e9600ac51a4.zip CMake-a364d2513a3fac76cf12cf3db21b7e9600ac51a4.tar.gz CMake-a364d2513a3fac76cf12cf3db21b7e9600ac51a4.tar.bz2 |
Xcode: Fixup XCTest bundle location for Xcode 7.3
Prior to Xcode 7.3 a XCTest bundle was built like an ordinary
bundle. But starting with Xcode 7.3 it is implicitely built as
a plugin for the test host. It looks like in that case the
'Build Products Path' is ignored.
This patch simply sets the CMake target output path to the value
Xcode expects internally to get a matching view of both.
The command:
xcodebuild -showBuildSettings -target CocoaExampleTests -configuration Debug
Output with Xcode 7.2:
TARGET_BUILD_DIR = .../Tests/XCTest/Debug
Output with Xcode 7.3
TARGET_BUILD_DIR = .../Tests/XCTest/Debug/CocoaExample.app/Contents/PlugIns
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
Diffstat (limited to 'Modules/FindXCTest.cmake')
-rw-r--r-- | Modules/FindXCTest.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/FindXCTest.cmake b/Modules/FindXCTest.cmake index 3cd9c22..805a58c 100644 --- a/Modules/FindXCTest.cmake +++ b/Modules/FindXCTest.cmake @@ -140,6 +140,10 @@ function(xctest_add_bundle target testee) set_target_properties(${target} PROPERTIES XCODE_ATTRIBUTE_BUNDLE_LOADER "$(TEST_HOST)" XCODE_ATTRIBUTE_TEST_HOST "$<TARGET_FILE:${testee}>") + if(NOT XCODE_VERSION VERSION_LESS 7.3) + set_target_properties(${target} PROPERTIES + LIBRARY_OUTPUT_DIRECTORY "$<TARGET_FILE_DIR:${testee}>/../PlugIns") + endif() else(XCODE) target_link_libraries(${target} PRIVATE -bundle_loader $<TARGET_FILE:${testee}>) |