On 12/04/2015 05:51 PM, Zaak Beekman wrote:
> What are the pros and cons of using FindMPI over passing FC=mpif90 and 
> CC=mpicc?

It shouldn't matter much if all the code in the project is meant
to be build for MPI.  Using plain FindMPI with the CC/CXX/FC set
to the system compilers is cleaner for building only a subset of
targets for MPI.  FindMPI will look for the MPI compilers separately
in order to ask them for the proper flags to tell the system compiler
how to use MPI, and then project CMake code can take responsibility
for applying that information to the desired subset of its targets.
Using CC=mpicc, FindMPI will recognize that the C compiler is already
a MPI compiler and not bother to look for a separate one to query
the settings (and similarly for C++ and Fortran).

-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to