From 3c394532edc282080ebc7d7fd8cc60bf0c10fb23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 12 Oct 2023 01:11:10 +0200 Subject: [PATCH] modules: updated FindCorrade.cmake. --- modules/FindCorrade.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/FindCorrade.cmake b/modules/FindCorrade.cmake index 969c68c9f..7d2e7256b 100644 --- a/modules/FindCorrade.cmake +++ b/modules/FindCorrade.cmake @@ -474,8 +474,9 @@ foreach(_component ${Corrade_FIND_COMPONENTS}) # Interconnect library if(_component STREQUAL Interconnect) # Disable /OPT:ICF on MSVC, which merges functions with identical - # contents and thus breaks signal comparison - if(CORRADE_TARGET_WINDOWS AND CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + # contents and thus breaks signal comparison. Same case is for + # clang-cl which uses the MSVC linker by default. + if(CORRADE_TARGET_WINDOWS AND (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")) if(CMAKE_VERSION VERSION_LESS 3.13) set_property(TARGET Corrade::${_component} PROPERTY INTERFACE_LINK_LIBRARIES "-OPT:NOICF,REF")