Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-12-06 03:34:14


On Monday 05 December 2005 20:09, Reece Dunn wrote:
> Vladimir Prus wrote:
> >If I modify the end of the rule to be:
> >
> > local raw = [ $(subvariant).sources-usage-requirements ] ;
> > raw = [ $(raw).raw ] ;
> > raw = [ property.change $(raw) : <pch-header> ] ;
> >
> > ECHO "XXXXXX" $(raw) ;
> >
> > result = [ $(result).add [ property-set.create $(raw) ] ] ;
> >
> >and then replace ../core with ../core//core, I get a single -Yu option
> > when compiling client/main.cpp. (I got double -Yu option before).
> >Instead of replacing ../core, you can add "explicit stdafx2" to
> >core/Jamfile.
>
> Cool. It might be useful to add this in the pch.jam comments or at least in
> documentation of this feature.
>
> >Looks like change to basic-target.compute-usage-requirements is the only
> >thing
> >missing in your patch!
>
> Feel free to make the necessary changes and then submit. Thanks again for
> the help :).

The patch is now committed.

1. I also remove <pch-file> features in addition to <pch-header>. Is that
right?
2. Can you test your examples -- I don't have msvc handy.

Speaking about 'cast' -- I think we can get away with it. The pch generator
only makes sense as top-level target -- i.e. when building "pch" main target.
It does not make sense to automatically try conversion to "PCH" type when
building some other main targets.

So, just wrap the body of "pch-generator.run" in

  if $(name)
  {
  }

This will make sure the generator is only run inside "pch" main target.
I can commit the change any time, but I have no idea how to test for the
problem.

- 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