Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-10-20 05:46:57


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.

>>
>
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 ;

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?

>> > - 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.

- 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