[CMake] FindMPI
Chuck Atkins
chuck.atkins at kitware.com
Thu Dec 1 14:01:45 EST 2016
>
> As far as enhancements to FindMPI go, It might be worthwhile to check if
> FC, CC,CXX match any obvious MPI wrappers, and then set MPI_<lang>_compiler
> and select the MPI version from there: If the user set the compiler
> explicitly to an MPI wrapper, that's likely the MPI they intend to use....
> If I find some time maybe I'll work up a pull request for this.
>
It's actualy already there since this is the default and preferred behavior
in Cray systems. As a fallback if MPI can't be found, then it tests the
regular compilers. If successful, it will not interrogate them and
MPI_FOUND wll be true but the MPI_<lang>_{LIBRARIES,INCLUDE_DIRS} variables
will be empty. Instead it will explicitly set
MPI_<lang>_COMPILER_NO_INTERROGATE=/path/to/mpi{cc,c++,f90}. Look around
line 600 (try_reguilar_compiler and interrogate_mpi_compiler)
I think the logic is a bit backwards on this and if you were to make a
change, I'd suggest it be there and re-order a few things such that if MPI
things haven't been already explicitly set then the *first* thing to do
(rather than last) is test the regular compilers, then if those don't work,
search for and interrogate the MPI wrappers.
- Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20161201/871879b1/attachment.html>
More information about the CMake
mailing list