Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2005-02-11 11:24:42


Vladimir Prus <ghost_at_[hidden]> writes:

> On Friday 11 February 2005 08:42, Sara Collins wrote:
>> This might be a silly question, but I only know how to
>> use an "AND" operator, for example
>>
>> <toolset>gcc,<variant>debug:<include>foo
>>
>> Is OR conditional available in BB? How about NOT?
>
> Nope, neither are possible in conditional requirements.
>
>> What I'm trying to do here is:
>>
>> if (!<toolset>foo)
>> {
>> build /lib//lib1
>> build /lib//lib2
>> ...
>> }
>
> Can be approximated with:
>
> alias build_others : : <toolset>foo ; # do-nothing alternative
> alias build_others : /lib//lib1 /lib//lib2 ;
> # used for all other toolsets, builds what you listed.
>
>> Or
>>
>> if (<toolset>foo || <toolset>bar)
>> {
>> build /lib//lib1
>> build /lib//lib2
>> ...
>> }
>
> Can be approximated with
>
> alias others : /libs//lib1 /libs//lib2 ;
> explicit others ;
> alias build_others : others : <toolset>foo ;
> alias build_others : others : <toolset>bar ;
> alias build_others ; # catch-all do-nothing alternative

Just on a stylistic note: I think some users of other build systems
(like Scons) may find it a little disturbing that we aren't giving
them a "nice, procedural way" to describe what should happen.
Personally I'm all for declarative DSLs, but I know that not everybody
thinks that way.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com
 

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