diff options
author | Gregor Jasny <gregor.jasny@logmein.com> | 2021-10-01 08:04:48 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-10-05 11:38:48 (GMT) |
commit | 0e86fea0bee63592e024c330b22939ec7846712e (patch) | |
tree | d73910d0264b0265d5b3d8a167945d12ce263c8a /Tests | |
parent | 12b999e66a8fded6f277271993c80bb9327dbfe2 (diff) | |
download | CMake-0e86fea0bee63592e024c330b22939ec7846712e.zip CMake-0e86fea0bee63592e024c330b22939ec7846712e.tar.gz CMake-0e86fea0bee63592e024c330b22939ec7846712e.tar.bz2 |
Tests: Specify destination for Xcode scheme
The `Using the first of multiple matching destinations` warning
vanishes if we explicitly specify a destination.
Fixes: #22704
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/XcodeProject/RunCMakeTest.cmake | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake index ed8e725..fa26c3d 100644 --- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake @@ -91,7 +91,12 @@ function(XcodeSchemaGeneration) file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") run_cmake(XcodeSchemaGeneration) - run_cmake_command(XcodeSchemaGeneration-build xcodebuild -scheme foo build) + if (XCODE_VERSION VERSION_GREATER_EQUAL 13) + set(maybe_destination -destination platform=macOS) + else() + set(maybe_destination "") + endif() + run_cmake_command(XcodeSchemaGeneration-build xcodebuild -scheme foo ${maybe_destination} build) endfunction() if(NOT XCODE_VERSION VERSION_LESS 7) |