From 6aae34ec53daf92a5ff272fb56757109003edb99 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 9 May 2023 14:23:26 -0400 Subject: Tests: Fix RunCMake.XcodeProject XcodeSchemaGeneration case on arm64 Explicitly specify the xcodebuild scheme destination architecture to match the host. --- Tests/RunCMake/CMakeLists.txt | 1 + Tests/RunCMake/XcodeProject/RunCMakeTest.cmake | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 75f2d35..ae7bdeb 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -672,6 +672,7 @@ endif() if(XCODE_VERSION) add_RunCMake_test(XcodeProject -DXCODE_VERSION=${XCODE_VERSION} + -DCMAKE_HOST_SYSTEM_PROCESSOR=${CMAKE_HOST_SYSTEM_PROCESSOR} -DCMake_TEST_Swift=${CMake_TEST_Swift}) add_RunCMake_test(XcodeProject-Embed -DXCODE_VERSION=${XCODE_VERSION}) diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake index 3910127..61f7c40 100644 --- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake @@ -101,7 +101,7 @@ function(XcodeSchemaGeneration) run_cmake(XcodeSchemaGeneration) if (XCODE_VERSION VERSION_GREATER_EQUAL 13) - set(maybe_destination -destination platform=macOS) + set(maybe_destination -destination platform=macOS,arch=${CMAKE_HOST_SYSTEM_PROCESSOR}) else() set(maybe_destination "") endif() -- cgit v0.12