|
Boost-Build : |
From: alex76vs (asyomichev_at_[hidden])
Date: 2004-12-27 09:37:33
--- In jamboost_at_[hidden], Vladimir Prus <ghost_at_c...> wrote:
> On Saturday 25 December 2004 19:52, Alexey Syomichev wrote:
> > Now I have a ".h -> .hpp" generator. How do i invoke it?
>
> Well, with CVS version you'd write
>
> hpp my_header : a.h ;
I tried this, but with the m10 version it didn't work. Cool, thanks!
> after that, you must make sure that V2 will handle #include
dependency to this
> generated header, see:
>
> exe my_exe : a.cpp b.cpp : <implicit-dependency>my_header ;
>
> The "implicit-dependency" feature says that some of my_exe sources
include
> targets produced by my_header. V2 will figure out which one, and
dependency
> should be correct.
This in an absolutely fantastic piece of functionality. How does it
figure out that an additional "-I" should be added to locate a
generated ".hpp" in the build output directory? This is more than I
could expect!
Now I am passing some extra arguments to the generator in the
following manner:
hpp b : b.h : <normalize-options>"abc def" ;
In order to extract the arguments I use a loop:
rule normalize ( target : source : options * )
{
local args ;
for local opt in $(options)
{
if $(opt:G) = <normalize-options>
{
args += $(opt:G="") ;
}
}
ARGS on $(target) = $(args) ;
}
I suspect that there should be some utility class/function in the
build system that would collapse all this into a single line. Is there
anything?
Thanks you,
--Alexey
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