AddThreads.cmake: use scoped target_link_libraries
"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:
@@ -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 ()
|
||||
|
||||
Reference in New Issue
Block a user