Boost logo

Boost-Build :

Subject: Re: [Boost-build] Basic bjam issues
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-10-09 11:55:54


AMDG

Alexander Sack wrote:
> - Why can't I use multiple build variants? I want to be able to build
> my project with certain features defined (i.e #define's). If I try to
> define a build variant for each one via:
>
> variant feature_support1 : <define>feature1 ;
> variant feature_support2 : <define>feature2 ;
>
> etc. I want to be able to turn them on and off from bjam command line
>

variants are considered mutually exclusive. The idea is that
bjam ... debug release will do both debug and release builds.

I suppose that you can make a separate feature for each.

feature feature_support1 : off on : implicit composite propagated ;
feature.compose <feature_support1>on : <define>feature1 ;

bjam feature_support1=on

> - I have a set of include files that need to be defined for some of
> the modules within my project. So I don't want to put an
> <include>blah in the top level Jamroot file, i.e. I want to define a
> alias or variable that I can substitute on some of my target rules to
> use this include.
>
> I tried the alias approach in the doc like so in my top-level Jamroot file
>
> alias common_includes : : : : <include>blah <include>blah1 ;
>
> etc.
>
> But this doesn't work. I can't seem to use it in any of my sub
> modules source lines nor can I use it in the usage-requiremetns. I
> then tried to use a simple variable and shell substitution but that
> let me to my first question.
>

You need to specify the project containing the target.

For example, in some_project/Jamfile you could refer to it as

..//common_includes

Alternately if Jamroot contains a project id
project my_project ;
then you can use that id

my_project//common_includes

In Christ,
Steven Watanabe


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