Browse Source

Merge topic 'xcode13-schema' into release-3.21

0e86fea0be Tests: Specify destination for Xcode scheme

Acked-by: Kitware Robot <[email protected]>
Merge-request: !6582
Brad King 4 years ago
parent
commit
5eef6ca26d
1 changed files with 6 additions and 1 deletions
  1. 6 1
      Tests/RunCMake/XcodeProject/RunCMakeTest.cmake

+ 6 - 1
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)