From: Matthew Herrmann (matthew.herrmann_at_[hidden])
Date: 2006-01-19 21:02:06
I'm setting up a library structure where each library lives in its own folder,
with an accompanying unit test in the "test" subfolder. When the library
builds, I also build a unit test using the boost framework.
The problem I have is that when the user imports the project, say, "hello",
they will pull in all the link dependencies of the unit test as well. This is
problematic using Boost's unit test framework since it links in libraries
that _must_ only be used by unit test programs.
Some solutions I've thought of but dislike are :
* separate project for unit test : defeats cohesion
* change all clients to link to project using "hello//hello" syntax : ugly and
* add aliases for every library used : maintenance and centralization issue
Has someone hit this problem before?
Thanks in advance for any help,
project hello ;
# define the library
lib hello : .... ;
# define the unit test for hello
[ glob test/*.cpp ]
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