diff options
author | Harry Mallon <hjmallon@gmail.com> | 2023-01-31 09:11:08 (GMT) |
---|---|---|
committer | Harry Mallon <hjmallon@gmail.com> | 2023-01-31 09:11:08 (GMT) |
commit | d7963aa9ee38bf26ab31433f2e7bfaff7ddf6c57 (patch) | |
tree | e0e32a00588a1770ad626ae0d0fe9f8dafd3afb8 /Modules/FindThreads.cmake | |
parent | 4dc058270d47316a7779e03ab8e60d75820a86f5 (diff) | |
download | CMake-d7963aa9ee38bf26ab31433f2e7bfaff7ddf6c57.zip CMake-d7963aa9ee38bf26ab31433f2e7bfaff7ddf6c57.tar.gz CMake-d7963aa9ee38bf26ab31433f2e7bfaff7ddf6c57.tar.bz2 |
FindThreads: Filter -pthread out for compatibility with Swift linker
Diffstat (limited to 'Modules/FindThreads.cmake')
-rw-r--r-- | Modules/FindThreads.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake index 701c143..0fa6ae7 100644 --- a/Modules/FindThreads.cmake +++ b/Modules/FindThreads.cmake @@ -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) |