Boost logo

Boost-Build :

From: Craig Rodrigues (rodrigc_at_[hidden])
Date: 2005-08-04 20:56:39


On Thu, Aug 04, 2005 at 04:05:45PM -0400, Craig Rodrigues wrote:
> Basically, what I want to do is to put:
> using gcc : default ;
>
> in my site-config.jam, so that by default, bjam will select the system
> version of gcc installed.
> In one particular Jamfile or Jamroot, I want to specify:
>
> using gcc : 4.0 : g++-4.0 ;

OK. I have been playing around with bjam for a while, and I think
I have something that I can deal with.

I did the following:

(1) In boost/tools/build/v2/user-config.jam, I put:
using gcc : default ;

That way if bjam is installed in a generic way on a system,
the user would get the default gcc compiler installed.

(2) In my Jamroot, or in an arbitrary Jamfile in my tree, I put:

import toolset : using ;
using gcc : 4.0 : g++-4.0 ;
project : requirements <toolset>gcc-4.0 ;

>From my reading of the BBv2 Jam code the above does the following:
- the "using" line initializes *another* gcc toolset
with "subfeature" 4.0. So at this point, I have 2 gcc toolsets
available: gcc-default and gcc-4.0.
If you do not specify which one to use, bjam will use the
first one, gcc-default.

Internally, these two toolsets are stored as property-sets:
<toolset>gcc/<toolset-gcc:version>default
<toolset>gcc/<toolset-gcc:version>4.0

<toolset>gcc is the "feature", and <toolset-gcc:version> is the
"subfeature"

- the "project" line initializes the project with a property
of <toolset>gcc-4.0, and causes the second toolset to be
selected

Is my understanding of this correct?
Is there a better/easier way to do what I want?

Thanks. :)

-- 
Craig Rodrigues 
rodrigc_at_[hidden]
 

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