diff options
author | Brad King <brad.king@kitware.com> | 2019-05-14 14:48:04 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-05-14 14:48:13 (GMT) |
commit | 7d9db24f4c1eb68687bf66002577781d01684478 (patch) | |
tree | c2fd47f074eaeee7a3570ef16b311c7d06623f21 /Tests/RunCMake/XcodeProject | |
parent | 9d48d3f61b25400a191f12ea92b8e5496ab47a8f (diff) | |
parent | e9d128b789f91c3f8d22e366500f58e6c7f6abc6 (diff) | |
download | CMake-7d9db24f4c1eb68687bf66002577781d01684478.zip CMake-7d9db24f4c1eb68687bf66002577781d01684478.tar.gz CMake-7d9db24f4c1eb68687bf66002577781d01684478.tar.bz2 |
Merge topic 'ios-xctest-lookup'
e9d128b789 Apple: Properly lookup XCTest for iOS and tvOS
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3309
Diffstat (limited to 'Tests/RunCMake/XcodeProject')
-rw-r--r-- | Tests/RunCMake/XcodeProject/RunCMakeTest.cmake | 15 | ||||
-rw-r--r-- | Tests/RunCMake/XcodeProject/XCTestLookup.cmake | 3 |
2 files changed, 18 insertions, 0 deletions
diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake index 4918f7c..191f56d 100644 --- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake @@ -256,4 +256,19 @@ if(XCODE_VERSION VERSION_GREATER_EQUAL 8) deployment_target_test(watchOS watchsimulator) endif() +if(XCODE_VERSION VERSION_GREATER_EQUAL 8) + function(xctest_lookup_test SystemName SDK) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XCTestLookup-${SDK}-build) + set(RunCMake_TEST_OPTIONS "-DCMAKE_SYSTEM_NAME=${SystemName}" "-DCMAKE_OSX_SYSROOT=${SDK}") + + run_cmake(XCTestLookup) + endfunction() + + xctest_lookup_test(Darwin macosx) + xctest_lookup_test(iOS iphoneos) + xctest_lookup_test(iOS iphonesimulator) + xctest_lookup_test(tvOS appletvos) + xctest_lookup_test(tvOS appletvsimulator) +endif() + # Please add macOS-only tests above before the device-specific tests. diff --git a/Tests/RunCMake/XcodeProject/XCTestLookup.cmake b/Tests/RunCMake/XcodeProject/XCTestLookup.cmake new file mode 100644 index 0000000..77676e5 --- /dev/null +++ b/Tests/RunCMake/XcodeProject/XCTestLookup.cmake @@ -0,0 +1,3 @@ +enable_language(C) + +find_package(XCTest REQUIRED) |