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

Component dependencies #22

Closed
mathstuf opened this issue Nov 5, 2019 · 5 comments
Closed

Component dependencies #22

mathstuf opened this issue Nov 5, 2019 · 5 comments

Comments

@mathstuf
Copy link

mathstuf commented Nov 5, 2019

Similar to #18, but more tractable since it is internal dependencies only.

find_package(Boost CONFIG COMPONENTS thread)

ends up with an "unknown target Boost::system" message. The transitive closure of the requested components should be made available to the requesting package because otherwise every package needs to embed this information internally. FindBoost.cmake handled the dependency tree at least, so this behavior for compatibility across the gap would be really helpful in that way too.

@pdimov
Copy link
Member

pdimov commented Nov 5, 2019

BoostConfig does bring in dependencies. https://github.com/boostorg/boost_install/blob/develop/test/thread/CMakeLists.txt passes, so there must be something else going on. What are the exact steps that lead to the failure?

@pdimov
Copy link
Member

pdimov commented Nov 5, 2019

If you're trying to use Boost::system further down in the CMakeLists.txt file, the problem is caused by the fact that Boost.Thread no longer indirectly depends on Boost.System via Boost.Chrono, due to this change: boostorg/chrono@5fd1761

BoostConfig gets its dependency info from the Jamfiles, so if they don't declare a dependency, it won't either.

FindBoost looks at autolink instead, so it's possible for the two to get out of sync, although in this case this shouldn't be the case; Boost.Chrono should no longer autolink to Boost.System either.

@mathstuf
Copy link
Author

mathstuf commented Nov 5, 2019

Hmm. I'll have to play around in the environment I found it in. The machine is busy at the moment, but I should get time by the end of the week.

@mathstuf
Copy link
Author

mathstuf commented Nov 5, 2019

Ah. This might be an issue with the third party project claiming too much and then forcing system on me because it uses Boost::system. I'll investigate that angle.

@pdimov pdimov closed this as completed May 6, 2020
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

No branches or pull requests

2 participants