Boost logo

Boost-Build :

From: pal.tw (b84037_at_[hidden])
Date: 2003-11-03 23:03:31


> Thanks! I've applied and comitted your first patch, together with
the test
> case available at
>
> http://zigzag.cs.msu.su:7813/working_copy/v2/test/composite.py
>
Thanks.
> As for the second patch... I'm about to look at it tomorrow. The
reason is
> that I found comment on feature.add-defaults which I don't
understand, and
> I'd like to understand it before comitting.
>
I describe the problem briefly. First, look at the following snippet.
--------------------------------------------------------------------
feature optimization : off speed space : propagated ;
feature debug-symbols : on off : propagated ;
feature runtime-debugging : on off : propagated ;
feature inlining : off on full : propagated ;

feature variant : : implicit composite propagated symmetric ;
variant debug : <optimization>off <debug-symbols>on <inlining>off
<runtime-debugging>on ;
--------------------------------------------------------------------

The 'variant' feature is not optional. So it has default value.
But when "set-default variant : release ;",
you will find it is not expanded as expected.
Because expand-composites phase is prior to add-defaults phase,
the default value of 'variant' has not been added yet.
--------------------------------------------------------------------
p = [ $(p).expand-composites ] ;
p = [ $(p).add-defaults ] ;
--------------------------------------------------------------------

As to my patch. I have found it still have a problem myself.
See the comment of the 'feature.jam' file.

--------------------------------------------------------------------
# Note: if there's there's ordinary feature F1 and composite feature
# F2, which includes some value for F1, and both feature have default
values,
# then the default value of F1 will be added, not the value in F2.
--------------------------------------------------------------------

It seems that to set default to a composite feature is meaningless.
Therefor let composite features alwalys be 'optional' might be a
solution.
Otherwise we had better consider their dependencies again.

 


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