Browse Source

ci: Explicitly enable or disable RunCMake.AppleSilicon test in macos jobs

Enable it on `macos-arm64` jobs and disable it on `macos-x86_64` jobs.
Since the default detection pierces Rosetta, it cannot be used in CI
where we might build and test on different hosts.
Brad King 10 months ago
parent
commit
a44a2d2579
1 changed files with 6 additions and 0 deletions
  1. 6 0
      .gitlab/ci/configure_macos_common.cmake

+ 6 - 0
.gitlab/ci/configure_macos_common.cmake

@@ -16,3 +16,9 @@ set(BUILD_QtDialog ON CACHE BOOL "")
 # when CMake itself is configured.  Use a version that is not
 # newer than the macOS version running on any CI host.
 set(CMake_TEST_XCTest_DEPLOYMENT_TARGET "10.15" CACHE STRING "")
+
+if("$ENV{CMAKE_CONFIGURATION}" MATCHES "macos_arm64")
+  set(CMake_TEST_APPLE_SILICON ON CACHE BOOL "")
+else()
+  set(CMake_TEST_APPLE_SILICON OFF CACHE BOOL "")
+endif()