From: Vladimir Prus (ghost_at_[hidden])
Date: 2002-09-13 05:17:38
David Abrahams wrote:
> From: "Vladimir Prus" <ghost_at_[hidden]>
>>>AFAICT features are already documented, so you must mean that you'd
>>>build variants documentation to appear nearby.
>>>Boost.Build v1 already said this about build variants, which seems to
> me to
>>>"A build variant, or simply variant is a named set of build properties
>>>describing how targets should be built. Typically you'll want at least
>>>separate variants: one for debugging, and one for your release code."
>>>Do you think more than that needs to be added?
>>Yea, we'd need to mention that it's a composite feature and describe how
>>they are declared, in pacticular that default values of non-optional
>>features are incorporated into build variant automagically.
> As it turns out, they are not. They are incorporated into the build
> specification (expanded build request combined with target requirements)
> automagically, but that's different... and the difference hinges on your
> next point:
>>Also, do we
>>wan't some variant inheritance/extension/templates. I don't remember how
>>it works in V1, so can't document this for V2.
> Yes, we do. And if the base build variant doesn't specify the value of a
> property that should not prevent a derived variant from specifying it.
Of course! But you can remember properties *specified* when declaring a
variant and use them when inheriting.
For example, variant "my-release" will have only one specified property,
<debug-symbols>off. Feature "release" will expand into that property and
default values for all non-optional properties.
Variant "my-release" will have additional property, say
<optimization>extra-high which will be combined with properties
*specified* for base variant "release". Default value for <optimization>
won't be used, because a value is already explicitly specified.
IOW, the fact that "release" expansion has <optimization>none, will not
present derived variants to have different settings, just because when
deriving we pick only explicitly defined properties, not default values.
Am I missing something?
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