[CMake] CMake + MPI

Andreas Naumann Andreas-Naumann at gmx.net
Tue Sep 8 08:07:38 EDT 2015


Hi Nico,

I just use find_package(MPI REQUIRED) and use the given 
MPI_CXX_LIBRARIES and MPI_CXX_INCLUDE_PATH.
Recent mpi wrappers should support support interspection.

Regards,
Andreas

Am 08.09.2015 um 13:01 schrieb Nico Schlömer:
> Hi everyone,
>
> When it comes to compiling and linking, the MPI world is quite a mess. 
> Sometimes, vendors make you link and include certain 
> libraries/directories, sometimes you are supposed to simply use a 
> compiler wrapper, often both.
>
> What's the recommended way of dealing with MPI in CMake? Do you 
> `find_package(MPI REQUIRED)` and set LINK_LIBRARIES and INCLUDE_DIRS? 
> Do you select a compiler wrapper from within the CMake file? From outside?
>
> Cheers,
> Nico
>
>



More information about the CMake mailing list