On 01. jan. 2015 22:02, Peter Dimov wrote:
I say that -I C:\boost-1.57.0\include is better and more consistent with expectations.
In addition, it also makes more sense even on its own. It's more consistent for "b2 headers" to create a "virtual" directory $BOOST/include from the contents of $BOOST/libs/*/include;
"b2 headers" should go away, it should not be needed any more when dependencies are cleaned up to a reasonable level. However, "b2 stage" could by default have same effect as "b2 install --prefix=.", then you will get exactly what you want I think.
putting the contents of $BOOST/libs/*/include into $BOOST doesn't seem right.
agree, the headers does not need to go anywhere before "install" or "stage" targets are called explicitly. But to get there the build rules for boost libraries and tests need -I../../system/include -I../../core/include ... etc. on command line rather than -IC:\boost_1.56.0
This would have been obvious if we had headers in libs/*/include, but since these directories always have their headers in a boost/ subdirectory, "b2 headers" puts nothing directly into $BOOST, so it works fine. Still, I can't think of any reason of insisting upon the current structure.
agreed
Yes, "b2 install" will put things in their proper place (on Linux), and yes, even without "b2 install" I can easily symlink /usr/include/boost to $BOOST/boost (on Linux), so it doesn't actually hurt (on Linux).
On Windows, one typical use is to unpack the Boost distribution into its final location and just b2 stage (without b2 install). Which works fine, and b2 then says, please add $BOOST to your include path and $BOOST/stage/lib to your library path. Which also works fine, except that first thing should, in my opinion, be $BOOST/include.
Why is there a reason this hurts more on Windows than on Linux?
What are the benefits of not putting the headers into include/? None as far as I can see.
Just avoiding the pain of a needless change if "b2 headers" is going away anyway, To be consistent you also need to change stagedir to $BOOST rather than $BOOST/stage or put headers in $BOOST/stage/include so "b2 stage" by default produce $BOOST/include $BOOST/lib or $BOOST/stage/include $BOOST/stage/lib -- Bjørn