Boost logo

Boost-Build :

Subject: Re: [Boost-build] Output directories of Boost Build
From: Edward Diener (eldiener_at_[hidden])
Date: 2015-09-19 14:21:32


On 9/19/2015 11:49 AM, Vladimir Prus wrote:
> Edward,
>
> Let me use an example with shorter paths, so that I can actually type on
> a small screen. Say you have Boost source in /tmp/boost, then the
> build-directory property in jamroot will cause build to go to
> /tmp/boost/bin.v2/gcc/...
>
> If you specify --build-dir=/tmp/build, that will change to
> /tmp/build/boost/gcc/... - note that bin.v2 is completely overridden,
> and 'boost' is added, taken from project declaration in Jamroot. This
> allows --build-dir to work if the build spans multiple Jamroot files.

Unfortunately you have confused me somewhat.

Using your example above you say that currently without specifying a
--build-dir the output goes to '/tmp/boost/bin.v2/some-toolset', but if
I set a --build-dir on the b2 command line the output goes to
'build-dir/boost/some-toolset' instead of 'build-dir/some-toolset' ? Why
would passing a --build-dir on the command line insert a project
declaration to the total path when not passing a --build-dir on the
command line does not insert a project declaration to the total path ?

This also means that if I currently do not pass a --build-dir on the
command line, and the output is going to the sub-directory bin.v2 of my
Boost source, then I can never duplicate the same place by setting a
--build-dir on the command line.

Or have I misunderstood you ?

>
> Stage and install dirs are not handled by Boost.Build, but by Boost C++
> libraries. If you run b2 --help in Boost C++ root, you will see two
> options that control those directories.

Are stage and install dirs only relevant when building from the Boost
C++ root and specifying either 'install' or 'stage' as the target ? Or
are they relevant in other situations ? I do see where I can set the
directories for the 'install' and 'stage' builds via --prefix ( and
possibly other choices ) and --stagedir respectively.

Finally I notice a 'dist' sub-directory off of my Boost C++ root where a
few tools, boostdep and inspect, have built their executables in
'./dist/bin'. Is this sub-directory relative to the --build-dir setting ?

My goal is to move the Boost git repository to a common partition shared
by multiple Windows OSs ( Vista, 7, 8.1, 10 ), but have any Boost build
actions go to the same local directories for each OS I have now, where I
have not been previously explicitly setting --build-dir or any of the
--prefix or --stagedir for 'install' or 'stage'. I realize I will have
to add these options to the b2 command line in my new setup but that
isn't a problem since I already have batch files performing all Boost
Build actions. I am just trying to determine how I can do this, thus my OP.

>
> HTH,
> Volodya
>
>
> On Sat, Sep 19, 2015, 17:45 Edward Diener <eldiener_at_[hidden]
> <mailto:eldiener_at_[hidden]>> wrote:
>
> On 9/19/2015 8:38 AM, Niklas Angare wrote:
> > "Edward Diener" <eldiener_at_[hidden]
> <mailto:eldiener_at_[hidden]>> wrote:
> >> Is there a general way to control the location of Boost Build output
> >> directories, or are they always relative to the source directory, or
> >> perhaps relative to the Boost top-level directory ?
> >
> > I found this in Jamroot with a quick search for bin.v2 in the
> repository :
> >
> > project boost
> > ...
> > : build-dir bin.v2
> >
> >> I would like to share my Boost git repository between different
> Window
> >> OSs in a multi-boot machine, using a common NTFS drive. But I
> want to
> >> have the output from Boost build go to different local drives
> for each
> >> OS.
> >
> > With a further search I found the --build-dir command-line option
> to b2
> > that would seem to solve your problem.
> >
> > http://www.boost.org/build/doc/html/bbv2/overview/invocation.html
>
> I am not sure what this means in the documentation.
>
> If currently my local Boost git repository from source is at
> C:/Programming/VersionControl/modular-boost do I specify the --build-dir
> as 'C:/Programming/VersionControl/modular-boost' to ensure that the
> output of tests goto C:/Programming/VersionControl/modular-boost/bin.v2
> ? What about install and stage directories ? Do they then go to
> sub-directories relative to C:/Programming/VersionControl/modular-boost
> if I set --build-dir as 'C:/Programming/VersionControl/modular-boost' ?


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk