Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-09-07 03:45:03


Zbynek Winkler wrote:
> Vladimir Prus wrote:
> >Hi Michael,
> >
> >>exe main
> >> # -- sources
> >>
> >> : main.cpp NumberTest.cpp
> >>
> >> # -- libs against which we link
> >> ../lib//long/<link>static
> >> C:/local/sde/projects/cppunit-1.10.2/lib/cppunitd.lib
> >> ;
> >>
> >>The last Jamfile builds the unit test, main.exe. I would like to be
> >>able to use the unit-test target to invoke main.exe automatically. Any
> >>help would, as always, be greatly appreciated.
> >
> >The 'unit-test' rule is synonym for the 'run' rule, which is defined like
> >this:
> >
> >rule run ( sources + : args * : input-files * : requirements * :
> > target-name ?
> >
> > : default-build * )
> >
> >So you'd have to write:
> >
> > unit-test main.cpp NumberTest.cpp > ../lib//long/<link>static
> > C:/local/sde/projects/cppunit-1.10.2/lib/cppunitd.lib
> > ;
>
> Has it been changed recently? Because for me, the unit-test requires a
> name first. So the above would have to be:
>
> unit-test name-of-the-exe-to-generate-and-run : main.cpp NumberTest.cpp
> ../lib//long/<link>static
> C:/local/sde/projects/cppunit-1.10.2/lib/cppunitd.lib ;

Oops, sorry. The unit-test rule calls 'run' but reorders the arguments, so
name should be the first argument to 'unit-test' indeed. I think this
confusion is deplorable, maybe we should deprecate 'unit-test'.

- 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