On Wed, Oct 29, 2014 at 12:05 PM, Backeljauw Franky <franky.backelj...@uantwerpen.be> wrote:
> We’ve managed to get CMake to build on our local filesystem, but when I load > it, it falls back to the system installed gcc instead of the intel toolchain: > /tmp/hello_world> cmake . > -- The C compiler identification is GNU 4.4.7 > -- The CXX compiler identification is GNU 4.4.7 > -- Check for working C compiler: /usr/bin/cc > -- Check for working C compiler: /usr/bin/cc -- works > -- Detecting C compiler ABI info > -- Detecting C compiler ABI info - done > -- Check for working CXX compiler: /usr/bin/c++ > -- Check for working CXX compiler: /usr/bin/c++ -- works > -- Detecting CXX compiler ABI info > -- Detecting CXX compiler ABI info - done > -- Configuring done > -- Generating done > -- Build files have been written to: /tmp/hello_world 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. Ward