Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2007-01-10 03:05:11

On Wednesday 10 January 2007 01:56, McMillan, Scott wrote:

> generators.register-standard cxxtest.gencxx-file : CXXTEST_H : CPP ;
> exe FooTS_runner : FooTS.cpp FooTS_runner.cxh : /* other requirements */
> Notice that I had to add the "_runner" to the cxh file so that there
> would not be two FooTS.o files (one from FooTS.cpp and one from
> processing FooTS.cxh and compiling the result).

> It is unsatisfying to rename the header file this way


        generators.register-standard cxxtest.gencxx-file : CXXTEST_H : CPP(%_runner) ;

that should append the _runner suffix to the generated CPP automatically.

> 1) If I wanted to continue with the .cxh approach, is writing a custom
> generator the way to process FooTS.cxh into FooTS_runner.cpp. If so
> could someone please help me as it is neither clear what method to
> override (generate-targets?) nor how to do it to accomplish this task.

You could have overriden generate-targets to append _runner to the name
of the output target.

> 2) Ultimately I would like to get back to something closer I have with
> our current Imakefile system which was to define a new rule that took
> FooTS as the argument (I would settle for a rule that had to take
> FooTS.h and FooTS.cpp as arguments), generates FooTS_runner.cpp from
> FooTS.h and compiled and linked FooTS.cpp and FooTS_runner.cpp into an
> executable called FooTS_runner.


        exe FooTS_runner : FooTS.cpp FooTS.h ;

work, as soon as _runner is automatically appended? Or you want something different?

- Volodya

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