Files
CMake/Modules/FindThreads.cmake
Alan W. Irwin de5f123d3a FindThreads: Do not hard-code '-l' flag on library name
When not using the `-pthread` flag we instead return a library to link
by name.  Previously we hard-coded the `-l` flag before the library
name.  When used with `target_link_libraries`, the hard-coded `-l` flag
is preserved rather than transformed into the link option preferred by
the toolchain in use.  Drop the explicit `-l` part to let CMake's
generators produce the proper way to link the threads library for the
current toolchain.

Fixes: #19747
2019-09-23 10:43:27 -04:00

7.3 KiB