|
Boost-Build : |
Subject: Re: [Boost-build] use-project for system and not threads
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-04-24 14:12:57
AMDG
Steve Soule wrote:
> On 04/24/2010 11:49 AM, Steven Watanabe wrote:
>
>> Steve Soule wrote:
>>
>>> My project uses the libraries boost_system and boost_thread. After some
>>> experimentation, I found that the following Jamfile (greatly simplified)
>>> correctly built my executable with the two libraries:
>>>
>>> use-project /boost/system : boost/libs/system/build ;
>>>
>>> exe myprogram
>>> : [ glob src/*.cpp ]
>>> /boost/system//boost_system/<link>static
>>> /boost/thread//boost_thread/<link>static
>>> ;
>>>
>>> I found that the "use-project" statement was necessary for boost_system
>>> but not boost_thread. I spent an hour or two looking through the
>>> various Jamfiles, but was unable to figure out why use-project was
>>> necessary for boost_system but not boost_thread.
>>>
>>> I'm curious why this would be. Does anyone know why use-project is
>>> necessary for boost_system but not boost_thread?
>>>
>> The Boost Jamroot contains use-project statements for all libraries.
>> Once it's loaded, /boost/xxx should work. You should be able to use
>>
>> use-project /boost : boost ;
>>
>
> It is true that you can use this shorter use-project statement instead
> of the longer one I used. This tip should be in the Boost Build
> documentation.
>
> But that doesn't answer my question: why is a use-project statement
> necessary for boost_system but not boost_thread?
It's because project names are global. Once you have
a use-project for anything in Boost, the Boost Jamroot
will be loaded, and all the libraries will be available.
You could replace use-project /boost/system : ... ;
with use-project /boost/thread : ... ; and it would still
work.
In Christ,
Steven Watanabe
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