[CMake] How to source a shell script from CMAKE
Filipe Sousa
filipe at ipb.pt
Thu Feb 9 19:31:38 EST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Linton, Tom wrote:
> 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?
CC=icc CXX=icpc cmake path/to/your/source/project
> 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
another option is exporting CC and CXX in your profile:
echo "export CC=icc" >> ${HOME}/.bashrc
echo "export CXX=icpc" >> ${HOME}/.bashrc
> 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.
- --
Filipe Sousa
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFD697qbQdNYqwwwCwRAgNSAJ4zDdR0psd3ZB8JvwESxQJKozFSdQCfTAP3
Au6Pk2T6v63cvOg13UGgfHE=
=CcpF
-----END PGP SIGNATURE-----
More information about the CMake
mailing list