mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 02:08:27 +08:00
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.
This commit is contained in:
@@ -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)
|
||||
|
@@ -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()
|
||||
|
Reference in New Issue
Block a user