From d10a5971f1dd40c1bbc914e035a630f4747f70dd Mon Sep 17 00:00:00 2001
From: Brad King <brad.king@kitware.com>
Date: Wed, 9 Oct 2013 13:50:59 -0400
Subject: [PATCH] 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".
---
 Modules/CMakeDetermineCompilerId.cmake |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index de4a882..71f15df 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/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()
-- 
1.7.10.msysgit.1

