Boost logo

Boost-Build :

Subject: Re: [Boost-build] features with 'propagate' attribute
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2017-03-30 18:39:02


AMDG

On 03/30/2017 11:58 AM, Stefan Seefeld via Boost-build wrote:
> Hello,
>
> how is the 'propagate' feature attribute handled. If I were to guess, I
> would assume that all 'propagate' features of a target are merged into
> all dependent targets feature sets. Is that right ?
>

Yes.

>
> So, a target's feature set is composed of:
>
>
> * default features
>
> * features provided on the command line
>
> * features explicitly added to target definitions
>
> * features propagated from 'source' targets
>
> * features from 'usage requirements' from 'source' targets
>
>
> Is that correct ? What are the merge rules in this, i.e. in what order
> may features from the above sources take precedence in the accumulated
> feature set ?
>

Summary:
requirements > command line/propagated > default-build > feature default

Details:
1) Free features from multiple sources are merged. Since
   all the features are in the result, precedence is irrelevant.
2) Features in the target requirements always take priority.
3) Non-free features on the command line and propagated
   features are equivalent. The command line is used
   to create the build-request for the targets named on
   the command line. If target A depends on B, then the
   build-request for B will be the propagated features
   on A.
4) The default-build of a target is applied when the
   feature is not present in the build-request.
5) The default value of a non-free feature has the lowest
   priority.
6) Usage-requirements must be free features. See (1)

In Christ,
Steven Watanabe


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