Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implicitly link Threads::Threads with CMake #413

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

lordjaxom
Copy link

This PR adds the Threads::Threads library (which resolves to pthread on Linux and is empty on Windows) when targeting the interface library Boost::asio. Without it, using Boost::asio on Linux leads to undefined symbols, e.g.

set(Boost_ROOT <path_to_boost_install_dir>)
find_package(Boost COMPONENTS asio)
target_link_library(myexe Boost::asio)

@lordjaxom
Copy link
Author

Submitting this here since CMake support is not a part of standalone asio.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant