FindThreads: Filter -pthread out for compatibility with Swift linker

stage/master/nightly/2023/02/01
Harry Mallon 2023-01-31 09:11:08 +00:00
parent 4dc058270d
commit d7963aa9ee
1 changed files with 1 additions and 1 deletions

View File

@ -231,7 +231,7 @@ if(THREADS_FOUND AND NOT TARGET Threads::Threads)
if(THREADS_HAVE_PTHREAD_ARG)
set_property(TARGET Threads::Threads
PROPERTY INTERFACE_COMPILE_OPTIONS "$<$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>:SHELL:-Xcompiler -pthread>"
"$<$<NOT:$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>>:-pthread>")
"$<$<AND:$<NOT:$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>>,$<NOT:$<COMPILE_LANGUAGE:Swift>>>:-pthread>")
endif()
if(CMAKE_THREAD_LIBS_INIT)