From 6cbd0658c56550a97acb21d4004ad3980f486eb0 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 12 Dec 2023 15:36:31 -0500 Subject: LinkerId: Match Apple linker on all Apple platforms `cmake_determine_linker_id` is only used for macOS because Apple device platforms set `_CMAKE_FEATURE_DETECTION_TARGET_TYPE` to `STATIC_LIBRARY`, but we might as well prepare for them anyway. --- Modules/Internal/CMakeDetermineLinkerId.cmake | 2 +- Tests/RunCMake/ParseImplicitLinkInfo/ld-v/xcode15.1-ld.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/Internal/CMakeDetermineLinkerId.cmake b/Modules/Internal/CMakeDetermineLinkerId.cmake index b66053f..7f0b516 100644 --- a/Modules/Internal/CMakeDetermineLinkerId.cmake +++ b/Modules/Internal/CMakeDetermineLinkerId.cmake @@ -35,7 +35,7 @@ function(cmake_determine_linker_id lang linker) OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE) - if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND linker_desc MATCHES "@\\(#\\)PROGRAM:ld.+PROJECT:[a-z0-9]+-([0-9.]+).+") + if(CMAKE_EFFECTIVE_SYSTEM_NAME STREQUAL "Apple" AND linker_desc MATCHES "@\\(#\\)PROGRAM:ld.+PROJECT:[a-z0-9]+-([0-9.]+).+") set(linker_id "AppleClang") set(linker_frontend "GNU") set(linker_version "${CMAKE_MATCH_1}") diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/ld-v/xcode15.1-ld.cmake b/Tests/RunCMake/ParseImplicitLinkInfo/ld-v/xcode15.1-ld.cmake index ca62f43..9982824 100644 --- a/Tests/RunCMake/ParseImplicitLinkInfo/ld-v/xcode15.1-ld.cmake +++ b/Tests/RunCMake/ParseImplicitLinkInfo/ld-v/xcode15.1-ld.cmake @@ -1 +1 @@ -set(CMAKE_SYSTEM_NAME "Darwin") +set(CMAKE_EFFECTIVE_SYSTEM_NAME "Apple") -- cgit v0.12