summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-05-27 14:37:17 (GMT)
committerBrad King <brad.king@kitware.com>2021-05-27 14:46:33 (GMT)
commit047585edc62fc4223a77a2c587a2ac795c91718f (patch)
tree5a51d57685f349bdd7b0d2c538d303ed04042e26
parent995f5b4e7b81e6672eaafba2c6d9a145e3aefe5d (diff)
downloadCMake-047585edc62fc4223a77a2c587a2ac795c91718f.zip
CMake-047585edc62fc4223a77a2c587a2ac795c91718f.tar.gz
CMake-047585edc62fc4223a77a2c587a2ac795c91718f.tar.bz2
BinUtils: Find linker and librarian for Intel compilers on Windows
Update our Intel linker and archiver rules to use the `<CMAKE_LINKER>` and `<CMAKE_AR>` placeholders instead of hard-coding the tool names.
-rw-r--r--Modules/CMakeFindBinUtils.cmake3
-rw-r--r--Modules/Platform/Windows-Intel.cmake4
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 "<CMAKE_AR>" "xilib" CMAKE_${lang}_CREATE_STATIC_LIBRARY "${CMAKE_${lang}_CREATE_STATIC_LIBRARY}")
- foreach(rule CREATE_SHARED_LIBRARY CREATE_SHARED_MODULE LINK_EXECUTABLE)
- string(REPLACE "<CMAKE_LINKER>" "xilink" CMAKE_${lang}_${rule} "${CMAKE_${lang}_${rule}}")
- endforeach()
endmacro()