From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-05-27 04:22:56
> VP> Yes. The problem is rather simple. If you have
> Maybe so, maybe not :)
> All that you saying works as expect but .... What if I have three
> targets lib tmp, lib foo, exe bar.
> lib foo depends on lib tmp, and exe bar depends lib foo. If I add
> to lib tmp, than lib foo will build with boost/date_time defines. But
Are you sure that "lib foo" will build with boost/date_time define. You must
have meant "lib tmp" --- you did not arrive to "lib foo" yet.
> when I add to lib foo either <dependency> or <library> on lib tmp, lib foo
> builds without boost/date_time defines. I don't want to add
> <dependency>@/boost/date_time to lib foo explicitly. What am I doing wrong
IOW, you have
exe bar <- lib foo <- lib tmp
The "tmp" lib uses boost/date_time, so it should have
<dependency>@/boost/date_time/boost_date_time in requirements
But, it also wants all libraries/exes which use it to link to the same
library. So, it must have <library>@/boost/date_time/boost_date_time in
Here's Jamfile which can illustrate my point:
lib foo : foo.cpp : <dependency>../libs/date_time/build/boost_date_time
: : <library>../libs/date_time/build/boost_date_time ;
lib bar : bar.cpp : : : <library>foo ;
exe hello : hello.cpp bar ;
Here, everything will be compiled with proper includes. I realize that
specifying one thing twice is a bit inconvenient, but let's make sure
basic semantic works OK before adding convenience.
> VP> I've wrote a document which describe all this some time ago, but it
> VP> never ended in docs :-(
> I have found nothing about <dependency> in boost_build_v2.html form
> cvs. Did I miss something?
Do, you did not. It only present in
That's what I meant by "never ended in docs".
Actually, part of my plan for M4 is to rename <dependency> to <uses>, and I'm
also going to document it --- or maybe the entire build process.
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