浏览代码

VS: Fix CMAKE_<LANG>_COMPILER detection with Intel toolset (#14471)

When the platform toolset is from Intel, look for "icl.exe" instead of
"cl.exe".
Brad King 12 年之前
父节点
当前提交
a6fd17ce50
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      Modules/CMakeDetermineCompilerId.cmake

+ 3 - 0
Modules/CMakeDetermineCompilerId.cmake

@@ -130,6 +130,9 @@ Id flags: ${testflags}
     endif()
     if(CMAKE_VS_PLATFORM_TOOLSET)
       set(id_toolset "<PlatformToolset>${CMAKE_VS_PLATFORM_TOOLSET}</PlatformToolset>")
+      if(CMAKE_VS_PLATFORM_TOOLSET MATCHES "Intel")
+        set(id_cl icl.exe)
+      endif()
     else()
       set(id_toolset "")
     endif()