From e7062a79bdca744dfeb09e61d6eb04bef62e9aa8 Mon Sep 17 00:00:00 2001 From: Evan Wilde Date: Thu, 6 Feb 2025 19:21:23 -0800 Subject: [PATCH] Xcode: Remove compiler id dependency on xctest Previously the compiler identification project would implicitly generate unit-tests that depend on XCTest when building for iOS, visionOS, and tvOS. Fixes: #26600 --- Modules/CMakeDetermineCompilerId.cmake | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 967ea20142..dd1059cb9d 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -719,9 +719,8 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS} set(id_sdkroot "SDKROOT = \"${CMAKE_OSX_SYSROOT}\";") if(CMAKE_OSX_SYSROOT MATCHES "(^|/)[Ii][Pp][Hh][Oo][Nn][Ee]" OR CMAKE_OSX_SYSROOT MATCHES "(^|/)[Xx][Rr]" OR - CMAKE_OSX_SYSROOT MATCHES "(^|/)[Aa][Pp][Pp][Ll][Ee][Tt][Vv]") - set(id_product_type "com.apple.product-type.bundle.unit-test") - elseif(CMAKE_OSX_SYSROOT MATCHES "(^|/)[Ww][Aa][Tt][Cc][Hh]") + CMAKE_OSX_SYSROOT MATCHES "(^|/)[Aa][Pp][Pp][Ll][Ee][Tt][Vv]" OR + CMAKE_OSX_SYSROOT MATCHES "(^|/)[Ww][Aa][Tt][Cc][Hh]") set(id_product_type "com.apple.product-type.framework") endif() else()