Boost logo

Boost-Build :

Subject: Re: [Boost-build] Boost build tutorial and target-os
From: Vladimir Prus (vladimir.prus_at_[hidden])
Date: 2015-09-25 03:13:17


On 25-Sep-15 3:29 AM, Edward Diener wrote:
> In the Boost build tutorial these lines are given:
>
> exe hello : hello.cpp ;
> install install-bin : hello : <target-os>windows:<location>"C:/Program Files/hello"
> <target-os>linux:<location>/usr/local/bin ;
>
> followed by the explanation:
>
> The feature <target-os> is another feature with mutually exclusive values. It can be set for example to windows or linux
> but not to both.
>
> This makes no sense since the example given is showing that the feature <target-os> is being used for 'windows' and
> 'linux'. The explanation is either that <target-os> is not a feature with mutually exclusive values or that the 3rd
> parameter to the 'install' rule specifies default values, but I have no idea from the tutorial which is the case.

Edward,

so 'hello' is a metatarget, and it can be generated, producing concrete targets, with a particular set of properties.

In a property set, the target-os feature can have only one value. However, what you see above are conditional
requirements. They basically say:

        - if target-os is windows, add "location" property with such-and-such value, or
        - if target-os is linux, add "location" property with that other value

So, it's not really adding two different values of target-os.

Is there a better way to express this in docs?

Thanks,
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