Boost logo

Boost-Build :

Subject: Re: [Boost-build] Global headers across projects
From: Alexander Sack (pisymbol_at_[hidden])
Date: 2008-10-15 12:13:24


On Wed, Oct 15, 2008 at 12:00 PM, Phillip Seaver <phil_at_[hidden]> wrote:
> Alexander Sack wrote:
>> I *BELIEVE* the issue is not the alias itself, it is the sub project
>> can't find the target alias from my Jamroot. Do you have subprojects
>> in your build hierarchy?
>>
>
> You can check to see if the alias is the problem with the change I
> suggested, though, pretty quickly. Or, more likely sounding to me, the
> <source> in the project requirements. You could also try
> "<source>/myproj//common_headers", assuming you have "project
> myproj....". I just read Stephen's email, and it sounds like <source>
> is the problem -- I think the work-around is to use the <include>'s
> directly in the project requirements.

I'm going to give that a shot. Try to reference it directly from the
subcomponent.

> Oh, yes. I just checked, and we have over 70 library and 35 executable
> targets in our tree (not everything is used at the moment, but...), each
> in their own sub-project. That's why I have a project target in my Jamroot.

Alright, same as me (maybe more exes than libs though!).

> Also, in my Jamroot, I have something like this to automatically use
> projects:
>
> local JAMFILE = [ modules.peek : JAMFILE ] ;
> # look for directories under libs containing jamfiles
> local search_dirs = [ MATCH (.*/.*)/.* : [ glob libs/*/$(JAMFILE) ] ] ;
> for local d in $(search_dirs) {
> # remove the "libs" for the project name
> local p = [ MATCH .*/(.*) : $(d) ] ;
> use-project /$(p) : $(d) ;
> }

Saw this from the boost-build itself when I was perusing for examples.
 I believe it searchs on the "build" directory in the various
libraries and aggregates them. Same idea I believe...

>
> Any directory under libs that has one of the file names listed in
> JAMFILE (which defaults to "[Bb]uild.jam [Jj]amfile.v2 [Jj]amfile.jam",
> I believe), gets added as a project. So, if you have libs/liba/Jamfile,
> it will do "use-project /liba : libs/liba ;" and then you can use
> "/liba" on the sources line anywhere you need it. I got tired of
> maintaining the list of use-project calls. :-)

Thanks I sort of planned to do this last but maybe its a good idea to
try to do this upfront! :D

-aps


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