Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-04-04 09:18:31

On Friday 01 April 2005 23:30, jeffreyholle wrote:
> I'm browsing the version 2 documentation in preperation of
> switching from version 1, and I have questions.
> Answers would be greatly appreciated!
> 1.There doesn't seem to be the equivalent of "features.jam" in the
> version 2 documentation. In version 1, this was a comprehensive list
> of all the feature properties (their names and possible values). Am I
> wrong? If so, can the equivalent be provided?

You're right, there's no such complete list. Maybe, some --help-features
options is indeed desired.

> 2.Since bjam v2 has new and improved handling of libraries, what's the
> <library> feature, expressed in a target's requirements section, for?

For putting it in project requirements. If you write:

project : requirements <library>/boost//foo ;

then all targets in Jamfile will link to /boost//foo. The <library> can also
be used for conditionals:

exe my : my.cpp : <toolset>gcc:<library>some_lib ;

Using <library> like this

exe my : my.cpp : <library>foo ;

is possible but not really necessary as you can write:

exe my : my.cpp foo ;

> 3.Whats the business of "usage-requirements" and "requirements" that
> are in some Jamfile.v2 targets? Perhaps these are optional keywords
> that are equivalent to "named parameters"? If so, does their use
> allow re-ordering/dropping sections?

Those are properties that apply to the entire project and indeed a like named
parameters. You can reorder them freely. Did you read

> 4.Whats the difference between a "target id" and "target reference"

The target reference can optionally include properties, say,


> 5.Its implied that the Jamfile.v2 that is in the same directory as the
> required project-root.jam file is automatically available for use. Is
> this true?

If you're using CVS version, then it's better to create *one* file called
Jamroot at the top of your project. It's a bit cleaner that project-root.jam
+ Jamfile.v2 which used to be required in M10. What do you mean by
"automatically available for use"? If you specify

use-project /foo : /some/dir ;

then Jamfile there is loaded, as well as all parent Jamfiles (and
project-root.jam, or Jamroot).

> It is also my understanding that if a Jamfile.v2 file has
> a "project" section, then this project-root.jam requirement goes away.
> Is this true?

For top-level dir, it's better to write everything in Jamroot.


Vladimir Prus
Boost.Build V2:

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