mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 10:50:16 -06:00
FindThreads: Pass -pthread to CUDA compiler through -Xcompiler
Fixes: #18008
This commit is contained in:
committed by
Brad King
parent
cf92fd9ae9
commit
83c13ca44f
@@ -208,7 +208,9 @@ if(THREADS_FOUND AND NOT TARGET Threads::Threads)
|
||||
add_library(Threads::Threads INTERFACE IMPORTED)
|
||||
|
||||
if(THREADS_HAVE_PTHREAD_ARG)
|
||||
set_property(TARGET Threads::Threads PROPERTY INTERFACE_COMPILE_OPTIONS "-pthread")
|
||||
set_property(TARGET Threads::Threads
|
||||
PROPERTY INTERFACE_COMPILE_OPTIONS "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler -pthread>"
|
||||
"$<$<NOT:$<COMPILE_LANGUAGE:CUDA>>:-pthread>")
|
||||
endif()
|
||||
|
||||
if(CMAKE_THREAD_LIBS_INIT)
|
||||
|
||||
Reference in New Issue
Block a user