Boost logo

Boost-Build :

Subject: Re: [Boost-build] Link test class to built library
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-03-04 14:23:06


AMDG

Siim wrote:
> I'm really new to Boost Build and I have a project which contains of a few
> libraries, each library has test classes. Now, I can compile a library into
> a dll (on Windows for example) using something like this:
>
> project MyProject
> : requirements <include>include
> : build-dir bin
> ;
>
> lib MyLib1 : [ glob src/*.cpp ] ;
>
> How can I build and link the test classes (so they would use the library
> includes and link against the just-built library)?
>
> # Builds the tests
> #exe test-mylub : test/test-mylib.cpp <- HOW?
>

Add <include>include/directory/for/library to the usage requirements
of MyLib1. Then add MyLib1 to the sources of test-mylib.

In Christ,
Steven Watanabe


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