[vtkusers] Using intel C++ compiler

Sean Ziegeler seanzig at users.sourceforge.net
Thu Apr 24 13:26:18 EDT 2008


I agree with Mike.  Don't edit anything, just set the environment 
variables as needed before doing anything.  Doing that lets cmake/ccmake 
choose configuration files for the proper compiler, if any exist for 
your platform.

You can take Mike's approach and set them in your dot files, or I like 
to run everything (exports, cmake/ccmake, make, make install) from a 
single shell script.

-Sean

Mike Jackson wrote:
> I'll comment that I tried "editing" various files when I first got ICC 
> and it just caused all sorts of subtle issues that were difficult to 
> diagnose. If you set the CC and CXX environment variables before _any_ 
> run of cmake things tend to work lots better.
> 
> Here is part of my .bash_profile that I use:
> 
> export ICC_INSTALL_DIR="/opt/intel/cc/10.1.012"
> alias intelcompile='export CC=/usr/bin/icc; export CXX=/usr/bin/icpc; 
> source \
> ${ICC_INSTALL_DIR}/bin/iccvars.sh'
> 
> so before I run cmake for the first time in a build directory I type 
> "intelcompile" in the terminal. This way my default compiler is still 
> gcc but I can easily switch to icc/icpc with one command (and a 
> subsequent cleaning of the build directory and rerun of cmake OR use a 
> second build directory.)
> 
> 




More information about the vtkusers mailing list