- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
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:
option(USE_INTEL_COMPILER ON)
if (USE_INTEL_COMPILER)
include(ForceCompiler)
set(CMAKE_VS_PLATFORM_TOOLSET "Intel C++ Compiler XE 13")
CMAKE_FORCE_C_COMPILER(icc Intel)
CMAKE_FORCE_CXX_COMPILER(icpc Intel)
message(STATUS "Using compiler: ${CMAKE_CXX_COMPILER_ID}") # outputs "Using compiler: Intel"
endif()
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
Lena
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot!
I was hoping for an easier solution, but I'll have a look at your Makefile.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Adding following parameter to cmake command line might help: -T"Intel C++ Compiler XE 13.0"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
seams no easy solution for this :(
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Pavel Holoborodko wrote:
Adding following parameter to cmake command line might help: -T"Intel C++ Compiler XE 13.0"
This worked for me - cmake used the VS generator with the Intel compiler. I found the string for the -T option in the Visual Studio menu: Tools | Options ... | Intel Compilers and Tools | C++ | Compilers, and used one of the listed Platform Toolsets.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page