Subject: Re: [boost] To modularize, or not to modularize. What is the plan?
From: Gavin Lambert (boost_at_[hidden])
Date: 2019-05-07 23:53:51
On 8/05/2019 07:31, Robert Ramey wrote:
>> Â Â git clone --depth 1 https://github.com/boostorg/boost.git
>> Â Â cd boost
>> Â Â git submodule update --init tools/boostdep libs/$X
>> Â Â python tools/boostdep/depinst/depinst.py -X test $X
>> Â Â ./bootstrap.sh
>> Â Â ./b2 --prefix=$Y --with-$X install
> a) I have to clone the whole of boost including the superproject. That's
> exactly what I'm trying to avoid.
Actually no, that's not what the above does. You are cloning the
superproject with --depth 1 (which means no history, just the current
tree). So it's basically no different from downloading a snapshot
archive with a bit of extra .git metadata. The rest are just empty
subdirectories until you run the submodule update.
And the submodule update is fetching only those named submodules, not
all of Boost.
By default the above grabs current master, but you can also add -b to
request a specific branch (or release tag).
So for example, if you just want Boost 1.70, you can:
git clone --depth 1 -b boost-1.70.0 --no-tags
You can also pass --depth 1 to the submodule update when fetching
And add -g '--depth 1' to the depinst command as well. Or fetch the
dependencies manually with more submodule updates rather than using
depinst; it might still be a bit too eager at fetching dependencies
as-is since it's looking at all the library files.
Or if you don't use --depth 1, then you get a larger download but you
can easily move between different versions and update to new versions in
> b) i have to build and invoke b2.Â Another thing i want to avoid.
If you're using any non-header-only library (and large chunks of Boost
fall into that category, such as Boost.Thread), then you can't avoid that.
> b) clone the library(s) into this local boost directory
> manually move the libraries include/boost/.. subdirectory
> into my newly created boost directory.Â Optionally I can create links
> to do the same thing.
Or you could run b2 headers, rather than making life complicated for
> No tools, no hassle.Â It's a pain, but its a one time thing.Â I only
> need to do it when I add a new boost library to my app.
Or when you update any of them, or switch versions. It's hardly a one
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk