summaryrefslogtreecommitdiffstats
path: root/Modules/FindMPI.cmake
diff options
context:
space:
mode:
authorChristian Pfeiffer <cpfeiffer@live.de>2017-12-05 11:31:56 (GMT)
committerChristian Pfeiffer <cpfeiffer@live.de>2017-12-05 13:17:27 (GMT)
commit2047eb360de5a9d2a8cac6a689bd7846c5a0128f (patch)
tree9ffcdeddd2275dc451b19c88b6ef6d3ff5d0ba80 /Modules/FindMPI.cmake
parent7746fdb2fe0177341aadeafec2ae73aa08ddfaf6 (diff)
downloadCMake-2047eb360de5a9d2a8cac6a689bd7846c5a0128f.zip
CMake-2047eb360de5a9d2a8cac6a689bd7846c5a0128f.tar.gz
CMake-2047eb360de5a9d2a8cac6a689bd7846c5a0128f.tar.bz2
FindMPI: Fix multiple configure runs
Due to a erroneous logical dependency on a temporary variable, FindMPI would depend its FOUND status on the set of flags needed to support compiler-implicit MPI support after the first configure run. This behavior is especially causing a misreported NOT FOUND status after the first run on MPI implementations without MPI compiler like MS-MPI or MPICH2 on Windows.
Diffstat (limited to 'Modules/FindMPI.cmake')
-rw-r--r--Modules/FindMPI.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index 7f4c44c..2af0329 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -1336,7 +1336,7 @@ foreach(LANG IN ITEMS C CXX Fortran)
set(MPI_${LANG}_FIND_VERSION_EXACT ${MPI_FIND_VERSION_EXACT})
unset(MPI_${LANG}_REQUIRED_VARS)
- if (MPI_${LANG}_WRAPPER_FOUND OR MPI_${LANG}_GUESS_FOUND)
+ if (NOT "${MPI_${LANG}_COMPILER}" STREQUAL "${CMAKE_${LANG}_COMPILER}")
foreach(mpilibname IN LISTS MPI_${LANG}_LIB_NAMES)
list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${mpilibname}_LIBRARY")
endforeach()