Common Pitfalls

  • Mixing incompatible compilers: Be careful incompatible compilers aren't selected automatically, e.g., mixing g77 with gfortran or mixing vendors even, by specifying to configure which C, C++, and Fortran compilers you want to use.  We often see a specific gfortran get combined with system /usr/bin/cc due to CMake probes.  Solution: explictly specify CMAKE_C_COMPILER, CMAKE_CXX_COMPILER, and CMAKE_Fortran_COMPILER.
  • Mixing MPI with incompatible compilers.  Solution: explicitly specify MPI_CXX_COMPILER, as well as the standard compilers shown above.
  • Mixing a system and custom-installed Boost.  Solution: see the guidance on specifying Boost in CMake options page TODO.