September 2018
Intermediate to advanced
606 pages
14h 32m
English
How can we select a specific compiler? For example, what if we want to use the Intel or Portland Group compilers? CMake stores compilers for each language in the CMAKE_<LANG>_COMPILER variable, where <LANG> is any of the supported languages, for our purposes CXX, C, or Fortran. The user can set this variable in one of two ways:
$ cmake -D CMAKE_CXX_COMPILER=clang++ ..
$ env CXX=clang++ cmake ..
Any of the recipes discussed so far can be configured for use with any other compiler by passing the ...
Read now
Unlock full access