-
Notifications
You must be signed in to change notification settings - Fork 50
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
Boost.URL as subproject should not automatically add dependencies #796
Comments
alandefreitas
added a commit
to alandefreitas/url
that referenced
this issue
Dec 5, 2023
The updated CI workflows include building Boost.URL with the Boost super-project as the project root, with Boost.URL as the project root, building a project that adds the Boost super-project as a subdirectory, a project that adds Boost.URL as a subdirectory, that finds Boost as a package and that finds Boost.URL as a package. fix boostorg#796
alandefreitas
added a commit
to alandefreitas/url
that referenced
this issue
Dec 5, 2023
The updated CI workflows include building Boost.URL with the Boost super-project as the project root, with Boost.URL as the project root, building a project that adds the Boost super-project as a subdirectory, a project that adds Boost.URL as a subdirectory, that finds Boost as a package and that finds Boost.URL as a package. fix boostorg#796
alandefreitas
added a commit
to alandefreitas/url
that referenced
this issue
Dec 5, 2023
The updated CI workflows include building Boost.URL with the Boost super-project as the project root, with Boost.URL as the project root, building a project that adds the Boost super-project as a subdirectory, a project that adds Boost.URL as a subdirectory, that finds Boost as a package and that finds Boost.URL as a package. fix boostorg#796
alandefreitas
added a commit
to alandefreitas/url
that referenced
this issue
Dec 6, 2023
The updated CI workflows include building Boost.URL with the Boost super-project as the project root, with Boost.URL as the project root, building a project that adds the Boost super-project as a subdirectory, a project that adds Boost.URL as a subdirectory, that finds Boost as a package and that finds Boost.URL as a package. fix boostorg#796
alandefreitas
added a commit
that referenced
this issue
Dec 6, 2023
The updated CI workflows include building Boost.URL with the Boost super-project as the project root, with Boost.URL as the project root, building a project that adds the Boost super-project as a subdirectory, a project that adds Boost.URL as a subdirectory, that finds Boost as a package and that finds Boost.URL as a package. fix #796
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/boostorg/cmake#using-an-individual-boost-library-with-add_subdirectory documents a workflow to include individual Boost libraries with add_subdirectory. The workflow works by extracting all transitive dependencies with boostdep and including each of them as a subdirectory.
This workflow is used by other Boost libraries by Peter, libraries whose CMake scripts were generated by boostdep, and is also used as an example in boost-ci:
25 Boost libraries use this pattern when testing the library being included as a subdirectory.
On the other hand, Boost.URL includes its dependencies from the superproject with
add_subdirectory
when included as a subdirectory. This means anyone else trying to use the pattern above also includes Boost.URL will get an error because they are trying to create targets for some dependencies twice (The existing target is an interface library created in source directory
).Thus, Boost.URL should probably stop including its dependencies so that it's brought into line with how its peers expect it to work.
However, we had a previous problem with the pattern above and we need to consider that in this transition. When transitive dependencies are explicitly listed in
cmake_test
, it creates errors that are sometimes impossible to fix because transitive dependencies are unstable. For instance,develop
but fail when it's pushed tomaster
because the transitive dependencies are different there.The reason most libraries that use this pattern haven't been having a problem with this seems to be that they are almost exclusively libraries that have been stable for a long time and have almost no transitive dependencies. Most are <= level 2 in terms of dependencies. The highest-level library there is Boost.Regex (level 6) whose 6 transitive dependencies are unlikely to change.
The text was updated successfully, but these errors were encountered: