Boost logo

Boost-Build :

From: jeffbenshetler (jbenshet_at_[hidden])
Date: 2004-11-06 14:31:15


Libraries (lib) do not appear to be inherited from parent Jamfiles.

Two questions:
1) How do I declare libraries in a parent Jamfile and make them
visible in subprojects?
2) What's the best way to refer to the boost libraries, when only the
results of "install" are visible? Is this reasonable?

Details

Given the following directory structure:

[um]---Jambase
|
|--[src]---Jambase
| |
| \--foo.cpp
|
\--[tst]---Jambase
|
\-foo_tst.cpp

We would like to define the external libraries needed by anything
under the [um] directory in um/Jambase. What we have tried so far
looks like this:

-----------------------------------------------------------
# in um/Jambase
project um ;

lib thread_lib : : <name>boost_thread-vc71-mt-gd-1_31
<search>../../../../tools/Boost/lib
<toolset>msvc ;

lib thread_lib : : <name>boost_thread-vc71-mt-1_31
<search>../../../../tools/Boost/lib
<variant>release
<toolset>msvc ;
---------------------------------------------------------

---------------------------------------------------------
# in um/src/Jambase
project libum :
requirements thread_lib # argument error
<lib>thread_lib # argument error
;

lib libum : foo.cpp
thread_lib # unable to find file or target
<lib>thread_lib # error gristed element in sources
;

---------------------------------------------------------

The library declarations work if they are in each Jambase (changing
the relative paths, of course). But the library declarations are not
visible to subprojects. My understanding is that subprojects read and
process superprojects (Jambase) up to the directory containing
project-root.jam.

<Aside>
I know this is not the best way to bring in libraries, but haven't
been able to figure out a better way. We have put in more than a week
of manual and example reading. For one thing, our development tree is
NOT underneath the Boost tree. I've tried
SEARCH threads.jam = $(BOOST_PATH) ;
and also
project um : requirements <search>@boost/lib
In both cases I still get "Cannot find boost_threads<extra>.lib"
</Aside>

 


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