Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-09-01 02:07:55


Hi Zhon,
> Rene Rivera wrote:
> > Or was that a boost.build question in disguise? Please provide more
> > details if so.
>
> It is a boost.build question. I am trying to convert my unit test make
> file to boost.build v2. The directory structure as shown in my previous
> message. The first question is how do i duplicate this section Makefile
> in a Jamfile.
>
> TEST_H := $(wildcard test/*test.h)
>
> runner.cpp: $(TEST_H)
> perl cxxtestgen.pl -o runner.cpp $(TEST_H)

I've replied about this one in another email. Here's a copy for convenience.

make test-runner.cpp : test-file.h : make-test-runner ;
actions make-test-runner
{
perl make-test-runner -output $(<)
}

>
> The second question deals with linking the tested files into runner.exe
>
> TESTED_OBJS = \
> dir1/testedfile.obj \
> dir2/testedfile2.obj \
>
> runner.exe: runner.obj $(TESTED_OBJS)
> link ...
>
> The runner.cpp exists in test/dir1/
>
> The question is how do i have Jamfiles in dir1 and dir2 and test/dir1?

Will putting this in top-level Jamfile work for you:

import testing ;
unit-test runner : runner.cpp dir1/testedfile.cpp dir2/testedfile2.cpp ;

If so, you don't need Jamfiles in subdirectories at all.

- Volodya

-- 
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build V2: http://boost.org/boost-build2
 

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