diff options
author | Brad King <brad.king@kitware.com> | 2021-05-27 10:37:17 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-05-27 10:46:33 -0400 |
commit | 047585edc62fc4223a77a2c587a2ac795c91718f (patch) | |
tree | 5a51d57685f349bdd7b0d2c538d303ed04042e26 /Modules | |
parent | 995f5b4e7b81e6672eaafba2c6d9a145e3aefe5d (diff) | |
download | cmake-047585edc62fc4223a77a2c587a2ac795c91718f.tar.gz |
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.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeFindBinUtils.cmake | 3 | ||||
-rw-r--r-- | Modules/Platform/Windows-Intel.cmake | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake index de516fce14..9dac4a9b4e 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 01f8dd0b15..26e0cdef4f 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() |