]>
Commit | Line | Data |
---|---|---|
11fdf7f2 TL |
1 | # Copyright 2017 Steven Watanabe |
2 | # Distributed under the Boost Software License, Version 1.0. | |
1e59de90 TL |
3 | # (See accompanying file LICENSE.txt or copy at |
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt) | |
11fdf7f2 | 5 | |
11fdf7f2 TL |
6 | import feature ; |
7 | ||
f67539c2 TL |
8 | #| tag::doc[] |
9 | ||
10 | [[bbv2.builtin.features.relevant]]`relevant`:: | |
11 | *Allowed values:* the name of any feature. | |
12 | + | |
13 | Indicates which other features are relevant for a given target. It is usually | |
14 | not necessary to manage it explicitly, as B2 can deduce it in most | |
15 | cases. Features which are not relevant will not affect target paths, and will | |
16 | not cause conflicts. | |
17 | + | |
18 | * A feature will be considered relevant if any of the following are true | |
19 | + | |
20 | ** It is referenced by `toolset.flags` or `toolset.uses-features` | |
21 | ** It is used by the requirements of a generator | |
22 | ** It is a sub-feature of a relevant feature | |
23 | ** It has a sub-feature which is relevant | |
24 | ** It is a composite feature, and any composed feature is relevant | |
25 | ** It affects target alternative selection for a main target | |
26 | ** It is a propagated feature and is relevant for any dependency | |
27 | ** It is relevant for any dependency created by the same main target | |
28 | ** It is used in the condition of a conditional property and the corresponding | |
29 | value is relevant | |
30 | ** It is explicitly named as relevant | |
31 | + | |
32 | * Relevant features cannot be automatically deduced in the following cases: | |
33 | + | |
34 | ** Indirect conditionals. Solution: return properties of the form | |
35 | `<relevant>result-feature:<relevant>condition-feature` | |
36 | + | |
37 | NOTE: This isn't really a conditional, although for most purposes it functions | |
38 | like one. In particular, it does not support multiple comma-separated elements | |
39 | in the condition, and it does work correctly even in contexts where conditional | |
40 | properties are not allowed | |
41 | ** Action rules that read properties. Solution: add toolset.uses-features to | |
42 | tell B2 that the feature is actually used. | |
43 | ** Generators and targets that manipulate property-sets directly. Solution: | |
44 | set <relevant> manually. | |
45 | ||
46 | |# # end::doc[] | |
47 | ||
11fdf7f2 | 48 | feature.feature relevant : : incidental free ; |