Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-11-17 07:10:10

On Thursday 17 November 2005 14:53, Reece Dunn wrote:

> >which includes -Fp"$(<[2])" but it's not taking effect? Wierd. Try adding
> The compile.pch action works fine.

Ah.. then I misunderstood something.

> The problem is that I want to pass the -Fp"..." option to the *compile.c++*
> actions, like I am passing the mypch.hpp! So, what I want to do is get the
> name of the PCH target when in the pch-generator and add it to the
> properties via <use-pch-header>, but I don't have the target name there :(.

You do have the V2 target there, and that's all that's needed. Try this:

   rule run ( project name ? : property-set : sources * )
        local r = [ $(project) $(name) : $(property-set) :
             $(sources) ] ;
          [ property-set.create
          ] $(r) ;

The second element of $(r) is the target corresponding to PCH.
You can add

   ECHO [ $(r[2].str ] ;

to be absolutely sure. If <use-pch-file> feature is defined as dependency,
and you use "flags" rule, then flags rule will take care of convertion from
V2 target to Jam target. And the same "bind" on action will handle the
conversion from Jam target to actual file name. Here, <use-pch-file> is not
different from <use-pch-header>


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