|
Boost-Build : |
Subject: Re: [Boost-build] Basic bjam issues
From: Alexander Sack (pisymbol_at_[hidden])
Date: 2008-10-09 14:36:53
On Thu, Oct 9, 2008 at 11:55 AM, Steven Watanabe <watanabesj_at_[hidden]> wrote:
> 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
Hmmm, I missed the feature section completely! Thanks I will give
this a try, this is exactly what I want.
>> - 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
Thanks! Weird, the doc to me was not clear on this. What I don't
understand is that I am assuming that the one Jamroot file and all the
sub Jamfiles are all part of the same project right? So why do I need
to do this?
Thanks again guys! I really want to evangelize bjam/boost internally
but I need to come up with a PoC to get it going! :D
-aps
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