[CMake] How to source a shell script from CMAKE

Linton, Tom tom.linton at intel.com
Thu Feb 9 18:39:19 EST 2006


The Intel icc compiler has a standard shell script called "iccvars.sh"
that is normally sourced to set up the environment for the compiler. Is
there a good way to ensure that this gets sourced from within CMAKE?

One option is to write a driver script "iccdriver" that sources
iccvars.sh and then set the CMAKE_CXX_COMPILER variable to point to this
script, but that seems a round-about approach. I'd like to be able to
just source iccvars from within my CMakeLists.txt file somehow.

Thanks

Tom


More information about the CMake mailing list