Boost logo

Boost-Build :

From: Phillip Seaver (phil_at_[hidden])
Date: 2006-04-20 11:42:25


Kostas Kostiadis wrote:
> Thanks for the feedback Philip...
> I've managed to use project-root.jam properly, and now my Jamfiles look a
> lot tidier. There are a few other issues that have cropped up though...
> Here comes:
>
> 1.
> What is site-config.jam used for? (Haven't found any examples of that
> anywhere)
>
You can use it for the same thing you use user-config.jam -- i.e., you
can put "using gcc ;" in it, for example -- but it could affect all
users of bjam on that system. That would mean the individual users
wouldn't have to do a user-config.jam. That assumes everyone wants to
use the same setup, of course. :-)
> I've looked at that when I was reading the manual but there are certain
> things it doesn't mention. For example, you can do
> ": usage-requirements <include>. "
> which is very handy, but is not mentioned anywhere in Table 4.1. (of the
> link you've posted). That's why I was asking if there is a complete
> reference somewhere.
>
Oops. I guess I didn't read the table well enough. :-) I don't know if
the documentation is more up-to-date somewhere else.
> Is there an easy way to force bjam to use v2 at all times?
>
In the same directory as my Jamroot.jam, I have a file named
"boost-build.jam" that just has "boost-build misc/boost-build/v2 ;" That
tells it where to find the boost.build files and I never have to use --v2.
> 4. (last one :))
>
> "If a lib X is using the debug version of the UTILS lib, then this
> : requirements <variant>debug:<define>ENABLE_ASSERTS
> should also be true for X lib and therefore ASSERT should evaluate to
> OutputSomeMessageAndHalt rather than NothingFunction."
>
Yes. That's what "usage-requirements" is for. Like:

project UTILS
: requirements <variant>debug:<define>ENABLE_ASSERTS
: usage-requirements <variant>debug:<define>ENABLE_ASSERTS
;

You can also have usage requirements for each target as the fifth
argument.
http://www.boost.org/doc/html/bbv2/advanced/jamfiles.html#bbv2.advanced.targets

rule-name main-target-name
: sources...
: requirements...
: default-build...
: usage-requirements...
;

Where "rule-name" is "obj", "lib", "exe", etc.

Phillip


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