From 047585edc62fc4223a77a2c587a2ac795c91718f Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 27 May 2021 10:37:17 -0400 Subject: BinUtils: Find linker and librarian for Intel compilers on Windows Update our Intel linker and archiver rules to use the `` and `` placeholders instead of hard-coding the tool names. --- Modules/CMakeFindBinUtils.cmake | 3 +++ Modules/Platform/Windows-Intel.cmake | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake index de516fc..9dac4a9 100644 --- a/Modules/CMakeFindBinUtils.cmake +++ b/Modules/CMakeFindBinUtils.cmake @@ -82,6 +82,9 @@ if(("x${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_SIMULATE_ID}" STREQUAL "xMSVC" AND list(PREPEND _CMAKE_MT_NAMES "llvm-mt") list(PREPEND _CMAKE_LINKER_NAMES "lld-link") list(APPEND _CMAKE_TOOL_VARS NM) + elseif("x${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ID}" MATCHES "^xIntel") + list(PREPEND _CMAKE_AR_NAMES "xilib") + list(PREPEND _CMAKE_LINKER_NAMES "xilink") endif() list(APPEND _CMAKE_TOOL_VARS LINKER MT AR) diff --git a/Modules/Platform/Windows-Intel.cmake b/Modules/Platform/Windows-Intel.cmake index 01f8dd0..26e0cde 100644 --- a/Modules/Platform/Windows-Intel.cmake +++ b/Modules/Platform/Windows-Intel.cmake @@ -25,8 +25,4 @@ endif() include(Platform/Windows-MSVC) macro(__windows_compiler_intel lang) __windows_compiler_msvc(${lang}) - string(REPLACE "" "xilib" CMAKE_${lang}_CREATE_STATIC_LIBRARY "${CMAKE_${lang}_CREATE_STATIC_LIBRARY}") - foreach(rule CREATE_SHARED_LIBRARY CREATE_SHARED_MODULE LINK_EXECUTABLE) - string(REPLACE "" "xilink" CMAKE_${lang}_${rule} "${CMAKE_${lang}_${rule}}") - endforeach() endmacro() -- cgit v0.12