> 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

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 

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 

Follow this link to subscribe/unsubscribe:

Reply via email to