mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 06:09:52 -06:00
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.
This commit is contained in:
@@ -1336,7 +1336,7 @@ foreach(LANG IN ITEMS C CXX Fortran)
|
|||||||
set(MPI_${LANG}_FIND_VERSION_EXACT ${MPI_FIND_VERSION_EXACT})
|
set(MPI_${LANG}_FIND_VERSION_EXACT ${MPI_FIND_VERSION_EXACT})
|
||||||
|
|
||||||
unset(MPI_${LANG}_REQUIRED_VARS)
|
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)
|
foreach(mpilibname IN LISTS MPI_${LANG}_LIB_NAMES)
|
||||||
list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${mpilibname}_LIBRARY")
|
list(APPEND MPI_${LANG}_REQUIRED_VARS "MPI_${mpilibname}_LIBRARY")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|||||||
Reference in New Issue
Block a user