chriskohlhoff / asio

Asio C++ Library
http://think-async.com/Asio
4.81k stars 1.2k forks source link

CMakeLists.txt for asio should specify dependency to Threads #1266

Open lordjaxom opened 1 year ago

lordjaxom commented 1 year ago

When importing Boost::asio from an install tree with find_package(Boost CONFIG COMPONENTS asio) and linking with target_link_libraries(myexe Boost::asio), the pthread library should be imported automatically.

See attached (proposed) patch. boost-1.81.0-z1-asio-threads.patch

Sorry if this is the wrong place for the issue (since the repo doesn't contain CMakeLists.txt), but I can't file an issue in boostorg/asio :-(

lordjaxom commented 1 year ago

Since CMake-support is not part of standalone asio, and boostorg/asio doesn't permit issues but pull-requests, but doesn't seem to be frequented much, I've added a pull-request there and hereby link it here :-) https://github.com/boostorg/asio/pull/413