[CMake] How to use icc on linux with cmake.

cedric cborgese at paradigmgeo.com
Tue Apr 17 12:34:29 EDT 2007


Le mardi 17 avril 2007 15:13, Mike Jackson a écrit :
> On OS X at least, intel provides a shell script that sets the icc
> variables. After I invoke that shell script located at source /opt/
> intel/cc/9.1.036/bin/iccvars.sh I then invoke cmake on a clean build
> directory and cmake seems to pick up everything related to icc for
> me. Give it a try and let us know.

On linux, this script set PATH and LD_LIBRARY_PATH so icc is usable, but 
actually not used.
To use it, I had to set CC=icc before running cmake. And I don't know of it's 
the right way to go since I don't know if 
${CMAKE_ROOT}/Modules/Plateform/Linux-icpc.cmake was include or if 
${CMAKE_ROOT}/Modules/Plateform/gcc.cmake is still used.

What is the right way to set the compiler ?


More information about the CMake mailing list