[CMake] FindMPI
Zaak Beekman
zbeekman at gmail.com
Wed Nov 23 18:05:08 EST 2016
Hi,
I want to be able to pass FC=mpif90 (or FC=$(which mpif90)) and CC=mpicc
etc. OR also be able to pass a compiler and use FindMPI to add link,
compile and include flags. I'm encountering an issue when my MPI
implementation is not on my PATH, I want CMake to be able to look in an
additional location (our build script can download and build MPICH and by
default installs it in user space) and also resolve where mpif90 is coming
from and look there too.
Whats the correct way to pass HINTS or PATHS to FindMPI? i.e., how do I
specify additional locations to search?
Using `find_package` with HINTS and PATHS means that it doesn't use
FindMPI. I also tried setting CMAKE_SYSTEM PREFIX_PATH, but I think that's
a cache variable set early, so it's not having an effect.
It would be great if FindMPI used the realpath of mpif90 etc when passed as
$FC.
TIA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20161123/e35be3b8/attachment.html>
More information about the CMake
mailing list