diff options
author | Brad King <brad.king@kitware.com> | 2019-07-25 17:09:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-07-25 17:09:25 (GMT) |
commit | 693a9b382a082a4a308e65e091c0af2c953a4a06 (patch) | |
tree | 7a5328abfb915dd5a8e47ed8c3fbbb93bd5f53cc /Modules | |
parent | 070a5e3835b11f76cc8ed8c4a2191295caf8069b (diff) | |
parent | cf04da7e702014c7cc163dd4a78bccdeff813210 (diff) | |
download | CMake-693a9b382a082a4a308e65e091c0af2c953a4a06.zip CMake-693a9b382a082a4a308e65e091c0af2c953a4a06.tar.gz CMake-693a9b382a082a4a308e65e091c0af2c953a4a06.tar.bz2 |
Merge branch 'FindMPI-link-flags' into release-3.15
Merge-request: !3605
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindMPI.cmake | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake index a80f799..9471be8 100644 --- a/Modules/FindMPI.cmake +++ b/Modules/FindMPI.cmake @@ -1142,16 +1142,13 @@ 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}") - unset(_MPI_${LANG}_LINK_FLAGS) + set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_LINK_OPTIONS "SHELL:${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}") |