|
Boost-Build : |
From: Johan Nilsson (johan.nilsson_at_[hidden])
Date: 2004-10-20 06:04:04
"Vladimir Prus" <ghost_at_[hidden]> wrote in message
news:cl5fn1$59j$1_at_sea.gmane.org...
>
> Johan Nilsson wrote:
>
> >> project my_project ;
> >> alias cppunit : deps/libs//cppunit ;
> >>
> >> and you'll be able to use "my_project//cppunit" in Jamfiles.
> >
> > I tried that but get the following error:
> >
> > error: Unable to find file or target named
> > error: 'myproj_deps//cppunit'
>
> Add "/" before the target reference.
Thanks, that works just fine.
>
> >>
> >
>
http://boost.org/boost-build2/doc/html/bbv2.advanced.builtins.targets.html#bbv2.builtins.testing
> >>
> >
> > That require that I replace 'exe' with 'unit-test'; is there a way of
> > doing this in two separate steps, e.g.:
> >
> > exe my_exe ;
> > run-unit-test my_exe ;
>
> I've just tried this:
>
> exe hello : hello.cpp ;
> unit-test hello.ut : hello ;
>
Works for me too, thanks.
> You need a different name for unit-test target in this case. Otherwise, V2
> will consider both exe and unit-test to be different alternatives of the
> same target. BTW, why do you need the above?
>
Invoke the test driver several times with different command-line parameters
(not absolutely necessary though).
>
> >> > - Can I specify the output directory of the .exe (it depends on a
> >> > couple of .dlls located in the bin directory)?
> >>
> >> No, at least now. You can use the "stage" rule in the meantime.
> >
> >
> > That doesn't seem to play well with the unit-test rule referenced above
> > (the tests are run at the original location, complaining about missing
> > DLLs).
>
> That should not happen? Which V2 version do you use? In M10
> (http://zigzag.lvk.cs.msu.su/~ghost/Milestone_10_preview/), which is due
> soon, the 'unit-test' rule adds the proper DLL paths.
I'm using the latest cvs version. Is there anyway to run the staged file
using the cvs version, preserving tags etc?
How can the unit-test rule know the proper DLL paths? I've got a couple of
import libraries under deps/libs as well, with the corresponding DLLs under
bin.
// Johan
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