Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-10-07 09:39:35


[I'm moving this back to the mailing list, now that we've diagnosed the
problem you had]

> > 2. Required library can be in different places on difference boxes.
>
> I agree. I don't think you would ever want to count on a library being
> outside of your source tree but in the _same_ absolute path on a different
> box.

Sure

> > Here, one possible approach would be have different site-config.jam on
> > those
> > boxes. I've just added the following lines to my copy of user-config.jam
> > (which is the same)
> >
> > import project ;
> >
> > project.initialize $(__name__) ;
> > project user-config ;
> >
> > use-project /boost/thread : /home/ghost/Work/boost/libs/thread/build ;
> >
> > And I can use /boost/thread in all my projects after that.
> >
> > Is this a satisfactory solution?
>
> Yes. I think it would be a little bit more convenient to be able to use
> BOOST_ROOT, which is already set up for each different box. In my project
> root Jamfile (I know putting "use-project" here works, but is it really the
> right place?) I'd put:
>
> use-project /boost/thread : $(BOOST_ROOT)/libs/thread/build ;
>
> Where BOOST_ROOT=c:\boost on my windows box. This doesn't work right now
> either. What do you think?

That's because Boost.Build does not inherit variables from environment in
module scope and each Jamfile is a separate module. You can use the following
code in your project-root.jam:

import modules ;
path-constant BOOST_ROOT : [ modules.peek : BOOST_ROOT ] ;

and after that all Jamfiles will be able to access BOOST_ROOT variable. As for
'use-project' in Jamfile --- I think that's perfectly okay. In fact, I think
that difference between project-root.jam and Jamfile should be eliminated and
the set rules allowed in project-root.jam should be the same as in Jamfile.

For example, right now the 'path-constant' rule can be used only in
project-root.jam, and there's no good reason for this limitation.

- Volodya

 


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