AddThreads.cmake: use scoped target_link_libraries
Alpine 3.23 Success
OpenBSD 7.8 Scripts failed

"All uses of target_link_libraries with a target must be either
all-keyword or all-plain." and this is the superiour choice.
This commit is contained in:
2026-07-20 01:46:51 +02:00
parent f28aa74e6b
commit b7f6b0c757
+1 -1
View File
@@ -18,6 +18,6 @@ function (add_threads target)
INTERFACE_COMPILE_OPTIONS "-pthread")
endif ()
if (CMAKE_THREAD_LIBS_INIT)
target_link_libraries (${target} "${CMAKE_THREAD_LIBS_INIT}")
target_link_libraries (${target} PUBLIC "${CMAKE_THREAD_LIBS_INIT}")
endif ()
endfunction ()