Browse Source

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.
Brad King 4 years ago
parent
commit
047585edc6
2 changed files with 3 additions and 4 deletions
  1. 3 0
      Modules/CMakeFindBinUtils.cmake
  2. 0 4
      Modules/Platform/Windows-Intel.cmake

+ 3 - 0
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)

+ 0 - 4
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()