summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/XcodeProject
diff options
context:
space:
mode:
authorGregor Jasny <gregor.jasny@logmein.com>2021-10-01 08:04:48 (GMT)
committerBrad King <brad.king@kitware.com>2021-10-05 11:38:48 (GMT)
commit0e86fea0bee63592e024c330b22939ec7846712e (patch)
treed73910d0264b0265d5b3d8a167945d12ce263c8a /Tests/RunCMake/XcodeProject
parent12b999e66a8fded6f277271993c80bb9327dbfe2 (diff)
downloadCMake-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/RunCMake/XcodeProject')
-rw-r--r--Tests/RunCMake/XcodeProject/RunCMakeTest.cmake7
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)