summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-06-19 11:25:56 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-06-19 11:26:04 (GMT)
commit89e80933d60766e50855f6e7d9b43d6515f6ee30 (patch)
treef9245012061bb78cce16ddda18698a8c60979191
parent631fe145e68cddd98fb42636833549d14113aa0d (diff)
parentf7eaa342de316707d99e6ae29c693a480861560d (diff)
downloadCMake-89e80933d60766e50855f6e7d9b43d6515f6ee30.zip
CMake-89e80933d60766e50855f6e7d9b43d6515f6ee30.tar.gz
CMake-89e80933d60766e50855f6e7d9b43d6515f6ee30.tar.bz2
Merge topic 'FindMPI-imported-link-flags'
f7eaa342de FindMPI: Store imported target link flags as a list instead of a string Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3449
-rw-r--r--Modules/FindMPI.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index fe09764..a80f799 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -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.