mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-01 03:11:08 -06:00
FindMPI: Fix regression in pthread guard
Fix a regression with MPI and CUDA<10.2 that did let `-pthread` flags
slip to nvcc again. In commit b725a19072 (FindMPI: Deny -fexceptions
from NVCC, 2020-07-02, v3.18.0-rc4~12^2) we accidentally forgot to use
the variable containing the replacement result.
Fixes: #21108
This commit is contained in:
@@ -1157,7 +1157,7 @@ macro(_MPI_create_imported_target LANG)
|
||||
string(REPLACE "-pthread" "$<$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>:SHELL:-Xcompiler >-pthread"
|
||||
_MPI_${LANG}_COMPILE_OPTIONS "${MPI_${LANG}_COMPILE_OPTIONS}")
|
||||
string(REPLACE "-fexceptions" "$<$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>:SHELL:-Xcompiler >-fexceptions"
|
||||
_MPI_${LANG}_COMPILE_OPTIONS "${MPI_${LANG}_COMPILE_OPTIONS}")
|
||||
_MPI_${LANG}_COMPILE_OPTIONS "${_MPI_${LANG}_COMPILE_OPTIONS}")
|
||||
set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_COMPILE_OPTIONS "${_MPI_${LANG}_COMPILE_OPTIONS}")
|
||||
unset(_MPI_${LANG}_COMPILE_OPTIONS)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user