Boost logo

Boost-Build :

From: fal_delivery (fal_delivery_at_[hidden])
Date: 2006-05-05 09:46:07


Noam Tamim wrote:

> 1. Can a single condition affect more than one requirement? Meaning,
> instead of writing:
> <platform>win32:<include>Win32 <platform>win32:<define>WIN32_BUILD
>
> can I use something like:
> <platform>win32:(<include>Win32 <define>WIN32_BUILD)
>
> ? This syntax doesn't seem to work, but maybe you have something else
> that does.

No, we have
property ( "," property ) * ":" property
only

> 2. How can I conditionally glob for files? I want something like:
> <platform>win32:<source>[ glob Win32/*.cpp ]
>
> However this does not work.

try to use aliases:

alias specific-sources
  : [ glob Win32/*.cpp ]
  : <platform>win32
  ;

alias specific-sources
  : [ glob freebsd/*.cpp ]
  : <platform>freebsd
  ;

alias specific-sources
  : [ glob posix/*.cpp ]
  ;

lib my_lib
  : specific-sources
...
  ;

i dont know how to apply aliases instead of (or together with)
conditional requirements. i found
http://boost.org/doc/html/bbv2/reference/buildprocess.html#bbv2.reference.buildprocess.alternatives,
`Alternative selection':
`For each alternative /condition/ is defined as the set of base
properies in requirements'
But what does it mean `base properties'? Can i write this

alias specific-sources
  : [ glob Win32/*.cpp ]
  : <platform>win32
    <platform>win32:<define>WIN32_BUILD
    <platform>win32:<include>Win32
  ;

So <platform>win32 is the only base property, isn't it?


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