summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-01-23 15:01:48 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-01-23 15:01:57 (GMT)
commit7cc74a59f3c95fb046fa03339295b52e8fca4484 (patch)
tree5d058307fd3a165d9f9c0f4ae6bc207789c58b2b /Modules
parent9771d231aae5f0858dd74d678a6768f0792597fc (diff)
parent95a501addb8c6d8fef3b5f284402fd00798a1147 (diff)
downloadCMake-7cc74a59f3c95fb046fa03339295b52e8fca4484.zip
CMake-7cc74a59f3c95fb046fa03339295b52e8fca4484.tar.gz
CMake-7cc74a59f3c95fb046fa03339295b52e8fca4484.tar.bz2
Merge topic 'findmpi-documentation'
95a501addb Help: Add more variable documentation to FindMPI Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4263
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindMPI.cmake22
1 files changed, 17 insertions, 5 deletions
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index cb52056..3e42386 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -96,15 +96,27 @@ For running MPI programs, the module sets the following variables
Variables for locating MPI
^^^^^^^^^^^^^^^^^^^^^^^^^^
-This module performs a three step search for an MPI implementation:
+This module performs a four step search for an MPI implementation:
-1. Check if the compiler has MPI support built-in. This is the case if the user passed a
+1. Search for ``MPIEXEC_EXECUTABLE`` and, if found, use its base directory.
+2. Check if the compiler has MPI support built-in. This is the case if the user passed a
compiler wrapper as ``CMAKE_<LANG>_COMPILER`` or if they're on a Cray system.
-2. Attempt to find an MPI compiler wrapper and determine the compiler information from it.
-3. Try to find an MPI implementation that does not ship such a wrapper by guessing settings.
+3. Attempt to find an MPI compiler wrapper and determine the compiler information from it.
+4. Try to find an MPI implementation that does not ship such a wrapper by guessing settings.
Currently, only Microsoft MPI and MPICH2 on Windows are supported.
-For controlling the second step, the following variables may be set:
+For controlling the ``MPIEXEC_EXECUTABLE`` step, the following variables may be set:
+
+``MPIEXEC_EXECUTABLE``
+ Manually specify the location of ``mpiexec``.
+``MPI_HOME``
+ Specify the base directory of the MPI installation.
+``ENV{MPI_HOME}``
+ Environment variable to specify the base directory of the MPI installation.
+``ENV{I_MPI_ROOT}``
+ Environment variable to specify the base directory of the MPI installation.
+
+For controlling the compiler wrapper step, the following variables may be set:
``MPI_<lang>_COMPILER``
Search for the specified compiler wrapper and use it.