Boost logo

Boost-Build :

Subject: Re: [Boost-build] Boost build tutorial and target-os
From: Edward Diener (eldiener_at_[hidden])
Date: 2015-09-25 16:50:21

On 9/25/2015 3:13 AM, Vladimir Prus wrote:
> 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?

Perhaps. But I now understand the issue after your explanation.

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at