Generating Visual Studio Projects with Intel C++ Compiler and CMake

Generating Visual Studio Projects with Intel C++ Compiler and CMake


We use CMake in our project and would like to generate Visual Studio projects which automatically use the Intel C++ Compiler (instead of the VS one).
In our CMakeLists we have:

set(CMAKE_VS_PLATFORM_TOOLSET "Intel C++ Compiler XE 13")
message(STATUS "Using compiler: ${CMAKE_CXX_COMPILER_ID}") # outputs "Using compiler: Intel"

 This does not seem to work. The generated project files still have the VS compiler configured.

What is the recommended way of cmake-generating projects using icc?

Thanks in advance


6 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

Hi Lena,

Older versions of Microsoft Visual C++ compiler ( versions 4, 5 and 6 ( also known as VS98 ) ) allowed to generate a Makefile from a Project file. I could generate two Makefiles, that is, one with ICC integration and the second one with MSC integration, and then you could use these Makefiles as prototypes for all the rest cases.

Let me know if you're interested.

Take a look at attached make file.

Fichiers joints: 

Fichier attachéTaille
Télécharger commonmakefile.txt6.1 Ko

Thanks a lot!
I was hoping for an easier solution, but I'll have a look at your Makefile. 

Portrait de Pavel Holoborodko

Adding following parameter to cmake command line might help: -T"Intel C++ Compiler XE 13.0"



Multiprecision Computing Toolbox for MATLAB
Portrait de J.W

seams no easy solution for this :(

coding for fun

Connectez-vous pour laisser un commentaire.