On Tue, May 25, 2010 at 10:10 AM, Belcourt, Kenneth <kbelco@sandia.gov> wrote:

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

Thanks Noel. It did solve my problem. I overlooked  build-dir option, partially because I kept looking for variable (per toolset ) that I can set to define the output directory i.e when I say  "bjam toolset=mytoolset" the output directory should be mydir.
I guess bin/debug is hard-coded at the boost-build level.

Appreciate so much for you looking into this. Thanks.
-Sandeep