Home | Libraries | People | FAQ | More |
The general overview of the build process was given in the user documentation. This section provides additional details, and some specific rules.
To recap, building a target with specific properties includes the following steps:
applying default build,
selecting the main target alternative to use,
determining "common" properties
building targets referred by the sources list and dependency properties
adding the usage requirements produces when building dependencies to the "common" properties
building the target using generators
computing the usage requirements to be returned
When there are several alternatives, one of them must be selected. The process is as follows:
The "common" properties is a somewhat artificial term. Those are the intermediate property set from which both the build request for dependencies and properties for building the target are derived.
Since default build and alternatives are already handled, we have only two inputs: build requests and requirements. Here are the rules about common properties.
Non-free feature can have only one value
A non-conditional property in requirement in always present in common properties.
A property in build request is present in common properties, unless (2) tells otherwise.
If either build request, or requirements (non-conditional or conditional) include an expandable property (either composite, or property with specified subfeature value), the behaviour is equivalent to explicitly adding all expanded properties to build request or requirements.
If requirements include a conditional property, and condiiton of this property is true in context of common properties, then the conditional property should be in common properties as well.
If no value for a feature is given by other rules here, it has default value in common properties.
Those rules are declarative, they don't specify how to compute the common properties. However, they provide enough information for the user. The important point is the handling of conditional requirements. The condition can be satisfied either by property in build request, by non-conditional requirements, or even by another conditional property. For example, the following example works as expected:
exe a : a.cpp : <toolset>gcc:<variant>release <variant>release:<define>FOO ;