On Wed, Oct 29, 2014 at 3:40 PM, Backeljauw Franky
<[email protected]> wrote:

>> Well, you have to tell it about icc/icpc. By default, CMake will look
>> for gcc and if it finds gcc, it will use it. EB sets several env
>> variables to point CMake in the right direction (CC, CXX, CFLAGS,
>> CXXFLAGS, ...). You also have to set these variables for CMake to use
>> the intel compilers. Just setting CC=icc CXX=icpc will probably do the
>> trick. If you build something with easybuild, this is all taken care
>> of.
>
>
> In that case, then what’s the benefit of having multiple CMake modules, e.g. 
> CMake-3.0.0-intel-2014b, CMake-3.0.0-foss-2014b, CMake-3.0.0-GCC-4.8.3? I 
> would think that, depending on the version you load, CMake would also know it 
> has to take the compiler with which it was built…

There is no benefit of having multiple CMake with different
toolchains. We already discussed multiple times what to do with
toolchain independent modules (stuff like autotools, cmake, bison,
...) and haven't come up with the perfect solution. They way EB
currently works, we need to build CMake for each toolchain. What
CMake-3.0.0-intel-2014b means is: CMake 3.0 build with intel 2014b
toolchain, not CMake 3.0 which always uses intel 2014b toolchain to
build stuff.

> If easy build takes care of this, then what does it do ‘extra’?

It sets a bunch of environmental variables and gives some arguments to
CMake where to look for includes, libraries, etc. Run easybuild with
the -l option, and you will see what it does (or just look into the
cmakemake class).

The fastest way to build something with the intel toolchain using a
CMake build system is: CC=icc CXX=icpc cmake .

Ward

Reply via email to