From 0e86fea0bee63592e024c330b22939ec7846712e Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Fri, 1 Oct 2021 10:04:48 +0200 Subject: Tests: Specify destination for Xcode scheme The `Using the first of multiple matching destinations` warning vanishes if we explicitly specify a destination. Fixes: #22704 --- Tests/RunCMake/XcodeProject/RunCMakeTest.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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) -- cgit v0.12