summaryrefslogtreecommitdiffstats
path: root/Modules/FindMPI.cmake
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-09-27 04:41:28 (GMT)
committerDavid Cole <david.cole@kitware.com>2012-09-27 04:41:28 (GMT)
commit8b7a5c616642d4636cb1c6ebfae1f16af0d6d606 (patch)
treea6b21247f7931249388aff63194c150537d6e667 /Modules/FindMPI.cmake
parent7892c87464f1d02717b971703ac375010ab8f30d (diff)
downloadCMake-8b7a5c616642d4636cb1c6ebfae1f16af0d6d606.zip
CMake-8b7a5c616642d4636cb1c6ebfae1f16af0d6d606.tar.gz
CMake-8b7a5c616642d4636cb1c6ebfae1f16af0d6d606.tar.bz2
FindMPI: Set correct variables for calls to FPHSA
Since FPHSA is called for multiple compiler languages with "MPI_${lang}" rather than just "MPI", make sure variables for controlling QUIET, REQUIRED and VERSION are propagated with names prefixed by MPI_${lang} as well, rather than just MPI. The find_package call sets up the values of MPI_FIND_REQUIRED and friends, but these calls to FPHSA need MPI_${lang}_FIND_REQUIRED and friends in order to function as intended.
Diffstat (limited to 'Modules/FindMPI.cmake')
-rw-r--r--Modules/FindMPI.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index ae50ca7..4ce4de9 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -576,6 +576,11 @@ foreach (lang C CXX Fortran)
try_regular_compiler(${lang} regular_compiler_worked)
endif()
+ set(MPI_${lang}_FIND_QUIETLY ${MPI_FIND_QUIETLY})
+ set(MPI_${lang}_FIND_REQUIRED ${MPI_FIND_REQUIRED})
+ set(MPI_${lang}_FIND_VERSION ${MPI_FIND_VERSION})
+ set(MPI_${lang}_FIND_VERSION_EXACT ${MPI_FIND_VERSION_EXACT})
+
if (regular_compiler_worked)
find_package_handle_standard_args(MPI_${lang} DEFAULT_MSG MPI_${lang}_COMPILER)
else()