Quantcast

Intel C Generator for Cmake?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Intel C Generator for Cmake?

Tony Garratt
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


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Intel C Generator for Cmake?

Petr Kmoch
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 <[hidden email]> 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



--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Intel C Generator for Cmake?

Tony Garratt

Thank you so much Petr. I am new to cmake so did quite understand how everything fits together. I will give your suggestion a try.....

Regards,
Tony

On Wed, Feb 15, 2017 at 12:25 PM, Petr Kmoch <[hidden email]> 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 <[hidden email]> 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

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Intel C Generator for Cmake?

Tony Garratt
In reply to this post by Petr Kmoch

I tried setting the FC and CC variables and yet cmake still wants to use the Microsoft compiler (BTW what I am building is the CGNS - the CFD common file format).

Is there something I am missing?

CGNS_Build>set CC=icc

CGNS_Build>set FC=ifort

CGNS_Build>set CC
CC=icc

CGNS_Build>set FC
FC=ifort

CGNS_Build>cmake   -D CMAKE_C_COMPILER:PATH=$CC   -D CMAKE_CXX_COMPILER:STRING=$CC   -D CMAKE
_Fortran_COMPILER:PATH=$FC   -D CMAKE_BUILD_TYPE:STRING="Release"   -D CGNS_BUILD_SHARED:BOOL=ON   -D CGNS_ENABLE_LEGACY=ON   -D CGNS_BUIL
DCGNSTOOLS:BOOL=OFF    ..\src
-- Building for: Visual Studio 12 2013
-- The C compiler identification is MSVC 18.0.40629.0
-- The CXX compiler identification is MSVC 18.0.40629.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at tools/CMakeLists.txt:6 (link_directories):
  This command specifies the relative path

On Wed, Feb 15, 2017 at 12:25 PM, Petr Kmoch <[hidden email]> 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 <[hidden email]> 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

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Intel C Generator for Cmake?

Tony Garratt
In reply to this post by Petr Kmoch

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 <[hidden email]> 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 <[hidden email]> 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

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Intel C Generator for Cmake?

Thompson, KT

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:[hidden email]] On Behalf Of Tony Garratt
Sent: Wednesday, February 15, 2017 6:21 AM
To: Petr Kmoch <[hidden email]>
Cc: [hidden email]
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 <[hidden email]> 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 <[hidden email]> 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


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Intel C Generator for Cmake?

J Decker

On Wed, Feb 15, 2017 at 6:42 AM, Thompson, KT <[hidden email]> wrote:

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:[hidden email]] On Behalf Of Tony Garratt
Sent: Wednesday, February 15, 2017 6:21 AM
To: Petr Kmoch <[hidden email]>
Cc: [hidden email]
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 <[hidden email]> 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 <[hidden email]> 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: <a href="tel:+44%2076%202430%209933" value="+447624309933" target="_blank">+44 7624 309933


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Intel C Generator for Cmake?

Tony Garratt
In reply to this post by Thompson, KT

Thank you so much for this suggest. It does work - partially anyway (I am using XE2015). When I use cmake --build it complains about some incorrect VS parameter. However, if I manually open the VS project created by cmake, then it does have all the C code being compile using Intel C++ and then if I build from within VS it builds fine.

Thanks
Tony

On Wed, Feb 15, 2017 at 2:42 PM, Thompson, KT <[hidden email]> wrote:

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:[hidden email]] On Behalf Of Tony Garratt
Sent: Wednesday, February 15, 2017 6:21 AM
To: Petr Kmoch <[hidden email]>
Cc: [hidden email]
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 <[hidden email]> 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 <[hidden email]> 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: <a href="tel:+44%2076%202430%209933" value="+447624309933" target="_blank">+44 7624 309933




--
Dr Tony Garratt
Tel: +44 7624 309933

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Loading...