Boost logo

Boost-Build :

From: Peter Schueller (schueller.p_at_[hidden])
Date: 2008-04-06 05:45:06

On Sun, Apr 6, 2008 at 6:56 AM, Vladimir Prus <ghost_at_[hidden]> wrote:
> 2. If you know for sure that CPP files created with different value of the
> feature are identical, and always will be, you have to remove the feature
> from the property set associate with the CPP file.
> The example generator has this code:
> # Produce one output, using just copy.
> local a = [ new action $(sources[1])
> : common.copy : $(property-set) ] ;
> local t = [ new file-target $(name) : CPP : $(project)
> : $(a) ] ;
> which can be modifier as follows:
> local raw = [ $(property-set).raw ] ;
> local stripped = [ property.change $(raw) : <gsoap.usage> ] ;
> local a = [ new actions $(sources[1]) : common.copy :
> [ property-set.create $(stripped) ] ;
> local t = [ new file-target $(name) : CPP : $(project)
> : $(a) ] ;
> In this case, the gsoap.usage property won't be associated with the
> target and the call to virtual-target.register will no longer complain
> that two different targets are associated with the same filename.
> Note: the above is untested, so some *details* might be wrong. It should
> work overall.

I only use the property to pass some information to the generator so
that the generator can decide which CPP files from the action are
passed to the target, i.e. which CPP files get linked into the final
LIB or EXE. Therefore I could use the method from above.

But this does not work, and I think the reason is the following fact
stated in property-set.jam:

 13 # - there's 1<->1 correspondence between identity and value. No
two instances of
 14 # the class are equal. To maintain this property, the
 15 # rule should be used to create new instances. Instances are immutable.

With your method I create two content-wise equal property-sets but
virtual-target still gets no instance equality and complains about a
duplicate target (see attached output.txt)

This seems similar to this problem which was fixed
in but I do not
understand how this changeset fixed it and if it applies to my

Kind regards,

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