|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2006-02-08 02:14:00
On Tuesday 07 February 2006 22:10, Daniel Einspanjer wrote:
> Hrm. I'm sorry, I should have read the new FAQ entry before I posted this.
>
> The FAQ entry makes it sound like what I am wanting to do as a one liner is
> not possible.
> It sounds lie I would have to either create a feature.compose for every
> customer I define or use conditional requirements for each customer I
> define in the project section.
>
> Does this sound correct that there is no one liner I can write that won't
> require maintenance when adding customers?
Hi Daniel,
until yesterday, you really had to use either feature.compose or conditional
requirements.
Today, using CVS state or nightly build, you can use the following in Jamroot:
import feature ;
feature.feature customer : first second : propagated ;
project
: requirements <conditional>@customer-define
;
rule customer-define ( properties * )
{
local c = [ feature.get-values <customer> : $(properties) ] ;
return <define>CUSTOMER=$(c) ;
}
The 'CUSTOMER' define will be added to all targets in Jamroot and in all child
Jamfiles. For convenience, I attach the testcase I've used. Go to the "sub"
directory and run "bjam -n". You should see the -DCUSTOMER=first option in
the command line (if you're using gcc, with msvc the option goes to response
file, so you'd need #ifdef in the source to make sure everything works)
- Volodya
*****************************************************************************
** **
** WARNING: This email contains an attachment of a very suspicious type. **
** You are urged NOT to open this attachment unless you are absolutely **
** sure it is legitmate. Opening this attachment may cause irreparable **
** damage to your computer and your files. If you have any questions **
** about the validity of this message, PLEASE SEEK HELP BEFORE OPENING IT. **
** **
** This warning was added by the IU Computer Science Dept. mail scanner. **
*****************************************************************************
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