Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-11-17 02:43:56


On Thursday 17 November 2005 00:33, Reece Dunn wrote:

> I now have:
>
> -- pch.jam --
>
> feature use-pch-header : : free dependency ;
.....
> which gets me part way there. This gives:
>
> msvc.compile.pch ..\..\..\build\tools\pch\msvc-6.0\release\mypch.obj
> ..\..\..\build\tools\pch\msvc-6.0\release\mypch.pch
> cl -c -Yc"pch.hpp"
> -Fo"..\..\..\build\tools\pch\msvc-6.0\release\mypch.obj"
> -Fp"..\..\..\build\tools\pch\msvc-6.0\release\mypch.pch"
> msvc.compile.c++ ..\..\..\build\tools\pch\msvc-6.0\release\main.obj
> cl -c "main.cpp"
> -Fo"..\..\..\build\tools\pch\msvc-6.0\release\main.obj" -Yu"<p.>pch.hpp"

You did not show your action/flags settings, but I suppose you have

  flags msvc.compile PCH_FILE : <use-pch-file>
  actions compile
  {
      ........... -Yu$(PCH_FILE)
  }

Try adding "bind PCH_FILE" right afet "actions compile". FWIW, in
http://boost.org/boost-build2/doc/html/bbv2/extending/features.html, there's
a complete example of adding an dependency feature, in that case, <def-file>.

> 1. How do I resolve the "<p.>pch.hpp" to an actual path?
> $(sources[2]).actualize doesn't work (problem with
> foo.actualize.actualize).

Hopefully explained above.

>
> 2. Is it possible to get the target name for the PCH target? I took a
> look at generator.jam and the target calculation looks complex!

Where do you want to get, and what exactly do you want to get? Jam's target
name or a file name, or what?

- 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