"Could not find any suitable mpi library!\n"
${MPI_ADDITIONAL_ERROR_STRING}
"\nPlease ensure that an mpi library is installed on your computer\n"
- "and set CMAKE_CXX_COMPILER to the appropriate mpi wrappers:\n"
- " $ CXX=\".../mpicxx\" cmake <...>\n"
- " $ cmake -DCMAKE_CXX_COMPILER=\".../mpicxx\" <...>\n"
+ "and set MPI_CXX_COMPILER to the appropriate mpi wrappers:\n"
+ " $ cmake -DMPI_CXX_COMPILER=\".../mpicxx\" <...>\n"
"Or with additional C and Fortran wrappers (recommended!):\n"
- " $ CC=\".../mpicc\" CXX=\".../mpicxx\" F90=\".../mpif90\" cmake <...>\n"
- " $ cmake -DCMAKE_C_COMPILER=\".../mpicc\"\\\n"
- " -DCMAKE_CXX_COMPILER=\".../mpicxx\"\\\n"
- " -DCMAKE_Fortran_COMPILER=\".../mpif90\"\\\n"
+ " $ cmake -DMPI_C_COMPILER=\".../mpicc\"\\\n"
+ " -DMPI_CXX_COMPILER=\".../mpicxx\"\\\n"
+ " -DMPI_Fortran_COMPILER=\".../mpif90\"\\\n"
" <...>\n"
)
ENDMACRO()
Compilers can be switched either by command line or by setting
<code>CMAKE_(C|CXX|Fortran)_COMPILER</code>:
<pre class="cmake">
-CC=mpicc CXX=mpicxx FC=mpif90 cmake <...>
+CC=my_c_compiler CXX=my_cxx_compiler FC=my_fortran_compiler cmake <...>
-cmake -DCMAKE_C_COMPILER="mpicc" -DCMAKE_CXX_COMPILER="mpicxx" -DCMAKE_Fortran_COMPILER="mpif90" <...>
+cmake -DCMAKE_C_COMPILER=my_c_compiler -DCMAKE_CXX_COMPILER=my_cxx_compiler -DCMAKE_Fortran_COMPILER=my_fortran_compiler <...>
</pre>
Please note that
<ul>