Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-09-29 02:22:58


Hi Matt,

> I am creating a module with custom features, e.g.
>
> feature a_feature : : free ;
>
> When specifying values simultaneously at the command line, in the root
> Jamfile, and in a subproject's Jamfile, the values get's appended to
> the property set. When I try to retrieve the value in a rule, using
> e.g.
>
> A_FEATURE = [ feature.get_values <a_feature> : $(requirements) ] ;
>
> I end up with
>
> a_feature: command_line_value, root_value, subproject_value

Yes, because free features are allowed to have several values.

> I've read in the boost build v2 about property refinement, but it's
> not very clear to me what needs to be done for
> a) specifying whether a feature gets overriden or not if one is trying
> to set it multiple times.

Basically, free features can have multiple values, and all the rest can have
only one.

> b) what order is used to set value:
> (1) command-line
> (2) following project Jamfile hierarchy.

I'd need to expand the relevant section a bit. In short: each project's
requriements are obtained by refining parent's requirements with explicitly
specified project requirements. Each target requirements are obtained by
refining project requirements with explicitly specified target requirements.

The command-line is processed in two ways:
1. If some property is not explicit specified, but present in target's
default-build, that value is used.
2. If some property is specified, but target requires a different one, the
required value is used.

> It seems that what I want to do is difficult with 'free' features...

Actually, impossible. We can fix the situation in two ways:
1. You can explain why you need free feature, and how it should work.
2. I can regularize the system so that 'free' and 'multivalued' become
different things. That would require some care though.

- Volodya

 


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