Fix MPI build for MPI library without mpi wrapper
authorRoland Schulz <roland@utk.edu>
Wed, 27 Jun 2012 07:31:12 +0000 (03:31 -0400)
committerRoland Schulz <roland@utk.edu>
Thu, 28 Jun 2012 02:02:32 +0000 (22:02 -0400)
commit92789c8433f0eec8a2c47a344aa0a37defbb49eb
tree5172ab30ae7e89c8e531bd2fd30d021973c3e8c8
parent3f6a09965eadd85a589a9d24141589c371564d3b
Fix MPI build for MPI library without mpi wrapper

Some MPI library (e.g. MPICH and OpenMPI on Windows) don't
contain any MPI wrappers and thus 417d0afff broke the support for
those MPI libraries.

This change uses the FindMPI module if the compiler is not a
mpi wrapper and cmake >= 2.8.5. Requiring mpi wrappers for
cmake < 2.8.5 avoids reintroducing the problems of #851.

To avoid any confusion of different behavior with older and newer
versions of cmake, all documentation should recommend the mpi wrapper
approach, which works for all versions. The FindMPI approach should
only be discussed for advanced users (to support e.g. Windows).

As a side effect this change makes it more convinient to use with
cmake>=2.8.5. No need to speciy mpi wrapper and less problems with
nvcc.

Fixes #958

Change-Id: Ic53d8125c5a58edc6789fe16f2b710e7e2568d4f
cmake/gmxManageMPI.cmake