[CMake] Intel C Generator for Cmake?

Thompson, KT kgt at lanl.gov
Wed Feb 15 09:42:28 EST 2017


Tony,

I don’t have access to the Intel compiler on Windows to try this out. However, in an old post I found, it was suggested that you can use cmake’s “-T” option to select the Intel compiler when the generator is “Visual Studio”.

For example:  -T"Intel C++ Compiler XE 13.0"

Ref: https://software.intel.com/en-us/forums/intel-c-compiler/topic/456288

-kt


From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of Tony Garratt
Sent: Wednesday, February 15, 2017 6:21 AM
To: Petr Kmoch <petr.kmoch at gmail.com>
Cc: cmake at cmake.org
Subject: Re: [CMake] Intel C Generator for Cmake?


Re: my previous email. To use the Intel C compilers I just can modify the VS settings. So I have a way forward.

Regards,
Tony

On Wed, Feb 15, 2017 at 12:25 PM, Petr Kmoch <petr.kmoch at gmail.com<mailto:petr.kmoch at gmail.com>> wrote:
Hi Tony,
generators are for different *buildsystems*: a generator for Makefiles, a generator for Visual Studio solutions, a generator for Ninja files, a generator for Eclipse projects etc.
Intel C and Intel Fortran are compilers, not buildsystems. You should be able to use them with any generator whose buildsystem supports those compilers.
On Windows, CMake supports generation of vfproj files using the Visual Studio generator. I don't know if Intel C has its own Visual Studio project type in the same fashion, and if so, whether CMake supports it.
One of the setups I maintain uses Visual Studio's C++ compiler and Intel Fortran compiler on Windows using the Visual Studio generator, and conceptually, it's as simple as this:
call ...\ifortvars.bat ...
set FC=ifort
cmake ...
Petr

On 15 February 2017 at 12:34, Tony Garratt <tony.garratt at ansys.com<mailto:tony.garratt at ansys.com>> wrote:
I am having to switch to cmake from autotools for a third party tool I want to build. We use Intel C and Intel Fortran on Windows. I see no mention of an Intel C generator for cmake. I presume this means there is not one? If so, can I create my own Intel C generator please?

Rgeards,
Tony

--
Dr Tony Garratt





--
Dr Tony Garratt
Tel: +44 7624 309933
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170215/96f646af/attachment.html>


More information about the CMake mailing list