Skip to content
Snippets Groups Projects
Commit cb0080d5 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'FindMPI-nvcc-link-pthread' into release-3.18


33192e1b FindMPI: Pass -pthread to NVCC through -Xlinker for device linking

Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !4981
parents bc185531 33192e1b
No related branches found
No related tags found
No related merge requests found
......@@ -1164,6 +1164,8 @@ macro(_MPI_create_imported_target LANG)
set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_COMPILE_DEFINITIONS "${MPI_${LANG}_COMPILE_DEFINITIONS}")
if(MPI_${LANG}_LINK_FLAGS)
string(REPLACE "-pthread" "$<$<LINK_LANG_AND_ID:CUDA,NVIDIA>:-Xlinker >-pthread"
_MPI_${LANG}_LINK_FLAGS "${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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment