MantisBT - CMake
View Issue Details
0014471CMakeCMakepublic2013-10-09 11:372014-03-05 09:58
Christian Weigel 
Brad King 
normalminoralways
closedfixed 
Windows7
CMake 2.8.11.2 
CMake 3.0CMake 3.0 
0014471: -T switch with Intel Compiler does not set CMAKE_CXX_COMPILER properly
When specifying the Intel Compiler platform toolset CMAKE_CXX_COMPILER is still set to the MSVC compiler when cmake is run inside the intel compiler command prompt.
Start Intel Compiler command prompt (e.g. C:\Windows\SysWOW64\cmd.exe /E:ON /V:ON /K ""C:\Program Files (x86)\Intel\Composer XE 2013\bin\ipsxe-comp-vars.bat" ia32 vs2010")

run cmake -T"Intel C++ Compiler XE 13.0" <src_path>

when verbosing CMAKE_CXX_COMPILER the output of the first run is:
-- Building for: Visual Studio 10
-- The C compiler identification is Intel 13.1.0.20130607
-- The CXX compiler identification is Intel 13.1.0.20130607
-- Check for working C compiler using: Visual Studio 10
-- Check for working C compiler using: Visual Studio 10 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 10
-- Check for working CXX compiler using: Visual Studio 10 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- CMAKE_CXX_COMPILER=c:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin
/cl.exe
No tags attached.
patch 0001-VS-Fix-CMAKE_-LANG-_COMPILER-detection-with-Intel-to.patch (967) 2013-10-09 13:52
https://public.kitware.com/Bug/file/4896/0001-VS-Fix-CMAKE_-LANG-_COMPILER-detection-with-Intel-to.patch
Issue History
2013-10-09 11:37Christian WeigelNew Issue
2013-10-09 13:52Brad KingAssigned To => Brad King
2013-10-09 13:52Brad KingStatusnew => assigned
2013-10-09 13:52Brad KingTarget Version => CMake 3.0
2013-10-09 13:52Brad KingFile Added: 0001-VS-Fix-CMAKE_-LANG-_COMPILER-detection-with-Intel-to.patch
2013-10-09 13:53Brad KingNote Added: 0034086
2013-10-10 09:05Brad KingNote Added: 0034098
2013-10-11 07:24Christian WeigelNote Added: 0034101
2013-10-11 08:39Brad KingNote Added: 0034102
2013-10-11 08:39Brad KingStatusassigned => closed
2013-10-11 08:39Brad KingResolutionopen => fixed
2013-10-11 08:39Brad KingFixed in Version => CMake 3.0
2013-10-18 10:04Brad KingNote Added: 0034153
2013-10-18 10:04Brad KingStatusclosed => resolved
2014-03-05 09:58Robert MaynardNote Added: 0035285
2014-03-05 09:58Robert MaynardStatusresolved => closed

Notes
(0034086)
Brad King   
2013-10-09 13:53   
Please try "0001-VS-Fix-CMAKE_-LANG-_COMPILER-detection-with-Intel-to.patch".

FYI, for the VS IDE generator you do not actually need to launch from the build environment.
(0034098)
Brad King   
2013-10-10 09:05   
Patch applied:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d10a5971 [^]

Please try it out and report back here. Thanks.
(0034101)
Christian Weigel   
2013-10-11 07:24   
Applying the patch to v.2.8.11.2 works:

Variable is now set to:
-- CMAKE_CXX_COMPILER=C:/Program Files (x86)/Intel/Composer XE 2013/bin/ia32/icl
.exe

I did NOT check the current development version, linked in note 0034098.
(0034102)
Brad King   
2013-10-11 08:39   
Great, thanks for testing.
(0034153)
Brad King   
2013-10-18 10:04   
The patch is now in master as this commit:

 VS: Fix CMAKE_<LANG>_COMPILER detection with Intel toolset (0014471)
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a6fd17ce [^]
(0035285)
Robert Maynard   
2014-03-05 09:58   
Closing resolved issues that have not been updated in more than 4 months