Commit 5affe415 authored by Brian Carlson's avatar Brian Carlson

FindMPI: Add MPI_EXECUTABLE_SUFFIX to every item in lists

Add the `${MPI_EXECUTABLE_SUFFIX}` to each of the items in the
`_MPI_${id}_${LANG}_COMPILER_NAMES` and `_MPI_${LANG}_GENERIC_COMPILER_NAMES` rather
than just adding the suffix to the last item in each list.
parent 2b1d9e51
......@@ -310,11 +310,15 @@ foreach (LANG IN ITEMS C CXX Fortran)
set(_MPI_${LANG}_COMPILER_NAMES "")
foreach (id IN ITEMS GNU Intel MSVC PGI XL)
if (NOT CMAKE_${LANG}_COMPILER_ID OR CMAKE_${LANG}_COMPILER_ID STREQUAL id)
list(APPEND _MPI_${LANG}_COMPILER_NAMES ${_MPI_${id}_${LANG}_COMPILER_NAMES}${MPI_EXECUTABLE_SUFFIX})
foreach(_COMPILER_NAME IN LISTS _MPI_${id}_${LANG}_COMPILER_NAMES)
list(APPEND _MPI_${LANG}_COMPILER_NAMES ${_COMPILER_NAME}${MPI_EXECUTABLE_SUFFIX})
endforeach()
endif()
unset(_MPI_${id}_${LANG}_COMPILER_NAMES)
endforeach()
list(APPEND _MPI_${LANG}_COMPILER_NAMES ${_MPI_${LANG}_GENERIC_COMPILER_NAMES}${MPI_EXECUTABLE_SUFFIX})
foreach(_COMPILER_NAME IN LISTS _MPI_${LANG}_GENERIC_COMPILER_NAMES)
list(APPEND _MPI_${LANG}_COMPILER_NAMES ${_COMPILER_NAME}${MPI_EXECUTABLE_SUFFIX})
endforeach()
unset(_MPI_${LANG}_GENERIC_COMPILER_NAMES)
endforeach()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment