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.

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
   : usage-requirements
   : 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


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

-- Noel

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at