Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-09-09 01:44:32

Hi Zbynek,

> What I would really like would be to replace the dependency
> specification by something else that would state that 'unit-test b' is
> unit test for b.cpp, so it needs to be run anytime b.obj is linked to
> something. Something like
> unit-test a.cpp : a-test.cpp ;
> unit-test b.cpp : b-test.cpp a.cpp ;
> unit-test c.cpp : c-test.cpp b.cpp a.cpp ;
> which would equal to
> unit-test a : a.cpp a-test.cpp ;
> unit-test b : b.cpp b-test.cpp a.cpp : <dependency>a ;
> unit-test c : c.cpp c-test.cpp b.cpp a.cpp : <dependency>a <dependency>b ;

Why do you need this. The way I arrange my tests is something like:

lib l : a.cpp b.cpp c.cpp ;
unit-test a-test : a-test.cpp l ;
unit-test b-test : b-test.cpp l ;

This is good because typically (for me), the a.cpp can't be tested in
isolation, and a library is the smallest isolated unit.

If I understand correctly, you want a.obj to never be included anywhere unless
a-test succeeds. Why do you want it. Is the error generated by 'unit-test'
not enough to catch your attention?

- Volodya


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