[vtkusers] Using intel C++ compiler

Mike Jackson imikejackson at gmail.com
Thu Apr 24 11:15:02 EDT 2008


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.)


-- 
Mike Jackson


On Apr 24, 2008, at 11:01 AM, Kent Eschenberg wrote:

> Or edit the files with 'compiler' in their name in the subdirectory  
> CMakeFiles. That may be dangerous, however, since cmake may have  
> already used another compiler to run various tests. Could the cmake  
> developers comment on this?
>
> Kent
> Pittsburgh Supercomputing Center
>
> Mike Jackson wrote:
>> You need to set the CC and CXX environment variables BEFORE you  
>> run the first cmake, ie, from a completely clean build directory.  
>> Otherwise cmake will just revert your compiler choice.
>> On Apr 24, 2008, at 12:01 AM, Alexander MacLennan wrote:
>>> Is there any reason why cmake 2.4.8 reverts to C++ even when I  
>>> set the CXX compiler from /usr/bin/c++ to /tools/intel/cce/ 
>>> 9.1.038/bin/icpc ?




More information about the vtkusers mailing list