Boost logo

Boost-Build :

Subject: Re: [Boost-build] Change default target directory for new toolset
From: Belcourt, Kenneth (kbelco_at_[hidden])
Date: 2010-05-25 13:10:49


On May 25, 2010, at 10:46 AM, Belcourt, Kenneth wrote:

> Hi Sandeep,
>
> On May 25, 2010, at 10:22 AM, Sandeep Gupta wrote:
>
>> I am using boost-build to setup a experiment framework by defining
>> new toolset, generators and features. It works as desired but
>> currently all builds are created within bin/debug/ directory. Is
>> there a way to change this to direct all builds some other directory.
>
> Wouldn't
>
> bjam --build-dir=some-other-directory ...
>
> do what you want? This option's described on page 18 of the
> documentation.
>
> http://www.boost.org/doc/tools/build/doc/userman.pdf

Oh, perhaps you don't like bin/debug/...

Then the solution is to set the build-dir option in each separate
Jamfile explicitly as, for example, you can see here with the product
name foo.

[ Jamfile ]

project foo
   : requirements
     <include>$(foo-root)/include
   : usage-requirements
     <include>$(foo-root)/include
   : build-dir $(foo-builddir)
   ;

and in the site-config.jam or Jamroot, etc.. define the variable foo-
builddir so that the path you desire is set on a per product basis.
For example, in your Jamroot you might have

[ Jamroot ]

    constant foo-builddir : $(builddir-arg) ;

where builddir-arg might be the --build-dir option off the command
line with a suitable default if the option's not specified.

Here's what one of our product (gtest) bin directories looks like
(product/version/compiler/variant/...).

     bin/gtest/1.4.0/intel-darwin-11.1/debug/address-model-64/mpi-
openmpi/

I'm not sure if that's of any help.

-- Noel


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