mirror of
https://github.com/Kitware/CMake.git
synced 2026-07-06 14:47:44 +00:00
FindMPI: Store imported target link flags as a list instead of a string
We already use the `separate_arguments` `NATIVE_COMMAND` mode to parse command-line strings into lists in several other places. Fixes: #18897
This commit is contained in:
committed by
Brad King
parent
a423194311
commit
f7eaa342de
@@ -1144,7 +1144,9 @@ macro(_MPI_create_imported_target LANG)
|
||||
|
||||
set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_LINK_LIBRARIES "")
|
||||
if(MPI_${LANG}_LINK_FLAGS)
|
||||
set_property(TARGET MPI::MPI_${LANG} APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${MPI_${LANG}_LINK_FLAGS}")
|
||||
separate_arguments(_MPI_${LANG}_LINK_FLAGS NATIVE_COMMAND "${MPI_${LANG}_LINK_FLAGS}")
|
||||
set_property(TARGET MPI::MPI_${LANG} APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${_MPI_${LANG}_LINK_FLAGS}")
|
||||
unset(_MPI_${LANG}_LINK_FLAGS)
|
||||
endif()
|
||||
# If the compiler links MPI implicitly, no libraries will be found as they're contained within
|
||||
# CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES already.
|
||||
|
||||
Reference in New Issue
Block a user