summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAxel Huebl <axel.huebl@plasma.ninja>2020-08-20 00:12:23 (GMT)
committerBrad King <brad.king@kitware.com>2020-08-20 10:52:45 (GMT)
commit47abe5f2251f5e31c2da428cd8d92ba56844856c (patch)
tree9872ce1a7aced3746447fc29a932a8d265bb0218 /Modules
parent09e8de75d5997ad2a57049426c5dc3b9238e2d34 (diff)
downloadCMake-47abe5f2251f5e31c2da428cd8d92ba56844856c.zip
CMake-47abe5f2251f5e31c2da428cd8d92ba56844856c.tar.gz
CMake-47abe5f2251f5e31c2da428cd8d92ba56844856c.tar.bz2
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
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindMPI.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index 25de562..bbd40a4 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -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)