Glen Fernandes wrote:
On Thu, May 29, 2014 at 1:22 PM, Julian Gonggrijp wrote:
- Manually: this is cumbersome and generally hard because there are many (undocumented) interdependencies between Boost libraries. - Automatically: as far as I know Ryppl is the only existing attempt at providing automated dependency handling for Boost, but it is a very ambitious project that attempts to do much more and it is currently neither finished nor being actively developed.
I think there could be a less ambitious but faster way to provide automated dependency handling. It would take no more than some static configuration, to list for each library what other Boost libraries it depends on, combined with a simple script that automatically traverses the dependency graph and clones just the necessary submodules. This script may then be hooked into the bootstrap script. I think I could write the dependency handler, and I would be willing to, though I can't currently provide any indication of when I would be able to start.
It would be nice if both approaches (static configuration, automatic identification) take into account - or allow you to specify - conditional dependencies (e.g. dependencies based on identification of supported or unsupported features determined by Boost.Config).
In my reply to Robert Ramey just now I mentioned the possibility to use Boost.Bjam's <toolset> to handle this. There might be other ways as well. Given that it is probably feasible to account for this, would you vote in favour of what I propose?
For example:
Boost.Align should only be considered as depending on Boost.TypeTraits (for boost::alignment_of) if BOOST_NO_CXX11_HDR_TYPE_TRAITS is defined; otherwise it uses the C++11 standard library (for std::alignment_of). Similarly, it only depends on Boost.Utility (for boost::addressof) if BOOST_NO_CXX11_STD_ADDRESSOF is defined; otherwise it uses the C++11 standard library (for std::addressof).
For anyone wanting to consume Boost.Align, should they have a conforming C++11 implementation, they should see Boost.Align's dependencies as only Boost.Config and Boost.Integer. Otherwise, someone consuming Boost.Align with a totally non-conforming C++11 implementation should see its dependencies as: Boost.Config, Boost.Integer, Boost.Utility, Boost.TypeTraits.
Glen