From 95a501addb8c6d8fef3b5f284402fd00798a1147 Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Wed, 22 Jan 2020 14:15:43 -0500 Subject: Help: Add more variable documentation to FindMPI --- Modules/FindMPI.cmake | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'Modules/FindMPI.cmake') diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake index 277903239d..d6cd799b3c 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__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__COMPILER`` Search for the specified compiler wrapper and use it. -- cgit v1.2.1