List Info

Thread: Re: Passing include directories between libraries




Re: Passing include directories between libraries
country flaguser name
United States
2007-04-02 07:44:55
Yes, that's what I mean. However, I want lib a to
"know" about its
directories, and lib b to "know" about _its_
directories. In other words, I
want to maintain use usage-requirements.

I've been able to do it this way so far:


--- a/Jamfile ---

lib a : a.cpp aa.cpp
        b-includes
      ;

lib a-includes : null.cpp
               :
               :
               : <include>a/headers
               ;

--- b/Jamfile
 
lib b : b.cpp bb.cpp
        a-includes
      ;

lib b-includes : null.cpp
               :
               :
               : <include>b/headers
               ;
-----

So you see, I had to build a "dummy" library with
an empty null.cpp file, in
order to export _only_ the usage-requirements
<include> to the users of the
library.

Is there a better way to do this?

-dr



> -----Original Message-----
> From: boost-build-bounceslists.boost.org 
> [mailto:boost-build-bounceslists.boost.org] On Behalf
Of 
> Vladimir Prus
> Sent: Monday, April 02, 2007 2:19 AM
> To: boost-buildlists.boost.org
> Subject: Re: [Boost-build] Passing include directories

> between libraries
> 
> On Saturday 31 March 2007 20:06, Dave Rahardja wrote:
> > Hi group.
> >  
> > Let's say I have two libraries, a.lib and b.lib,
each with 
> its own Jamfile,
> > under a common Jamroot.
> >  
> > I need a.lib to know about the header directory of
b.lib, 
> and vice versa.
> > How do I do this?
> 
> I don't know what you mean by "know about the
header 
> directory". If you
> want a.lib to be compiled with include path to b.lib,
then I'd use:
> 
>    lib a : ....   : <include>../b/whatever ;
> 
> Normally, I recommend usage requirements:
> 
>    lib b 
>          :  # sources
>          : # requirements
>          : # default build
>          : <include>whatever ;
> 
>    lib a : b <some other sources> ;
> 
> However you say that a should use b's includes and b
should
> use a's includes. Such circular dependency between
Boost.Build targets
> is not allowed, therefore you'd have to use
<include>whatever for
> your a and b targets.
> 
> - Volodya
> 
> 
> 
>     
> _______________________________________________
> Unsubscribe & other changes: 
> http://lists.boost.org/mailman/listinfo.cgi/boost-build
> 

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )