Boost logo

Boost :

Subject: Re: [boost] Moving the include directory to $BOOST_ROOT/include? (again)
From: Bjørn Roald (bjorn_at_[hidden])
Date: 2015-06-03 02:38:57


On 31. mai 2015 14:30, Peter Dimov wrote:
> I want to reiterate my suggestion that we move Boost's include directory
> from $BOOST_ROOT to $BOOST_ROOT/include.
>
> This has the following benefits:
>
> - it follows the established naming practice,
> - it does not make the whole Boost reachable from the include path as it
> does now,

how exactly are planning to make that work when it seems you still plan
on keeping the current "b2 headers" machinery as the mechanism that put
files (links) in $BOOST_ROOT/include? If you plan to support building
the content of $BOOST_ROOT/include with copies using something like "b2
stage" I do understand and I am more inclined to be in favor of a change
like this.

> - when building Boost, the message given at the end would be
>
> The Boost C++ Libraries were successfully built!
>
> The following directory should be added to compiler include paths:
>
> C:\Projects\boost-git\boost\include
>
> The following directory should be added to linker library paths:
>
> C:\Projects\boost-git\boost\stage\lib

So if you go ahead with this, and while you are at it, why not stage the
libs to $BOOST_ROOT/lib rather than $BOOST_ROOT/stage/lib. As this
change is motivated by following the "established" naming practice then
I think the stage folder is a rather odd thing for the library path,
given that the include path is not in the stage folder?

As far as how b2 should support this, the "b2 stage", which now seem to
be default when you just type b2, should create (stage) a monolithic
view of your selected parts of boost in:

$BOOST_ROOT/include
$BOOST_ROOT/lib

Which I think is much better than

$BOOST_ROOT/include
$BOOST_ROOT/stage/lib

Having said that, conceptually I like the stage step as a build step and
the stage folder as a staging area within $BOOST_ROOT of what will be
installed somewhere else if you use "b2 install --prefix=PREFIX", with
this as a concept the message at the end of the build could be:

The Boost C++ Libraries were successfully built!

The following directory should be added to compiler include paths:

     C:\Projects\boost-git\boost\stage\include

The following directory should be added to linker library paths:

     C:\Projects\boost-git\boost\stage\lib

Use ./b2 install --prefix=PREFIX to install boost elsewhere.

I realize that this is sort of swimming against the current here and I
am not going to argue any more for it unless it gain significant support
from others.

Remember, before header files where moved to $BOOST_ROOT/libs/*/headers
they lived in $BOOST_ROOT/boost and there where no need to stage them in
$BOOST_ROOT/stage like the libraries had to be staged. Then we invented
"b2 headers" as a band aid to keep the $BOOST_ROOT/boost structure
alive as a proxy to support internal use of header files between boost
libraries the same as before. As a side effect boost users that
preferred to build boost themselves and opted to not use "b2 install"
could still use $BOOST_ROOT/boost. I think that is unfortunate, maybe
we should have hidden the header links somewhere out of sight as long as
they where needed, maybe within $BOOST_ROOT/bin.v2 and done what we are
discussing now with proper copies for external use in the first place.
Possibly as part of a modified "b2 stage" target.

I think it is vise to plan for b2 headers linking mechanism to
eventually go away, as boost libraries hopefully will be able to build
themselves without using a monolithic view of all boost headers, rather
use headers in needed in libs/*/include directories directly during the
build.

Side note: I hope all references to $BOOST_ROOT above for anything
derived during the build, will be redirected with b2 --build-dir. So
when I e.g.: refer to $BOOST_ROOT/include it is in fact an include
folder in the build directory.

--
Bjørn
--
Bjørn

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk