From 1925477cb7d6782af9ca8308ba1a7604d2087b30 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 29 Oct 2025 14:47:57 -0400 Subject: [PATCH] macOS: Do not incorrectly search for per-arch SDKs Extend commit a9b41195d2 (Handle multi-arch sysroots on Apple platforms, 2019-07-26, v3.17.0-rc1~287^2) to recognize versioned macOS SDK names. Fixes: #27340 --- Modules/Platform/Darwin-Initialize.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Platform/Darwin-Initialize.cmake b/Modules/Platform/Darwin-Initialize.cmake index 0c0a206ced..d518ac9779 100644 --- a/Modules/Platform/Darwin-Initialize.cmake +++ b/Modules/Platform/Darwin-Initialize.cmake @@ -183,7 +183,7 @@ function(_apple_resolve_multi_arch_sysroots) return() # Only apply to multi-arch endif() - if(NOT CMAKE_OSX_SYSROOT OR CMAKE_OSX_SYSROOT STREQUAL "macosx") + if(NOT CMAKE_OSX_SYSROOT OR CMAKE_OSX_SYSROOT MATCHES "(^|/)[Mm][Aa][Cc][Oo][Ss][Xx]") # macOS doesn't have a simulator sdk / sysroot, so there is no need to handle per-sdk arches. return() endif()