Merge topic 'findmpi-found-cond'

2047eb36 FindMPI: Fix multiple configure runs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1556
This commit is contained in:
Brad King 2017-12-06 13:00:01 +00:00 committed by Kitware Robot
commit b6dd3969e8

View File

@ -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()