Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-03-15 02:32:40


Zbynek Winkler wrote:
> There is this empty section about creating custom main targets at
> http://www.boost.org/tools/build/v2/doc/extending.html#main_target_rules.
> I've tried to find something related in the sources but I was not
> successful :(. So my question is - how do I create custom main target?

Alas, not docs still. However, "build/alias.jam" is a simple-to-understand
example.

> PS. Even rule my-test visible in all Jamfiles would be enough...
> rule my-test ( name : sources * )
> {
> unit-test $(name) : $(sources) /site-config//cppunit /util//testMain ;
> }

Oh, that's even simpler. Put the above code in project-root.jam and then add

IMPORT $(__name__) : my-test : : my-test ;

after the rule definition. That would bring the rule to global module where
everybody can access it.

- 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