summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-06-26 11:12:01 +0000
committerKitware Robot <kwrobot@kitware.com>2019-06-26 07:12:24 -0400
commit1e263065e12435ade250d83ab04e61c4453b12fe (patch)
tree43b67a2281c90c883685a74df8b1751bdb301185
parentc92f5f6a7325c8a6c3b07d7a36a94c474d7ea977 (diff)
parent39c572c9c932802595eb50594e24c961cfa1151b (diff)
downloadcmake-1e263065e12435ade250d83ab04e61c4453b12fe.tar.gz
Merge topic 'findmpi_use_interface_link_options'
39c572c9c9 FindMPI: Updated to use INTERFACE_LINK_OPTIONS Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3476
-rw-r--r--Modules/FindMPI.cmake5
1 files changed, 2 insertions, 3 deletions
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index a80f799879..fc9810c837 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -1142,16 +1142,15 @@ macro(_MPI_create_imported_target LANG)
set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_COMPILE_DEFINITIONS "${MPI_${LANG}_COMPILE_DEFINITIONS}")
- set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_LINK_LIBRARIES "")
if(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}")
+ set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_LINK_OPTIONS "${_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.
if(MPI_${LANG}_LIBRARIES)
- set_property(TARGET MPI::MPI_${LANG} APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${MPI_${LANG}_LIBRARIES}")
+ set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_LINK_LIBRARIES "${MPI_${LANG}_LIBRARIES}")
endif()
# Given the new design of FindMPI, INCLUDE_DIRS will always be located, even under implicit linking.
set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${MPI_${LANG}_INCLUDE_DIRS}")