mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 12:49:36 -06:00
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.
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user