Boost logo

Boost-Build :

Subject: Re: [Boost-build] Pointing to a Boost tree for bjam
From: Edward Diener (eldiener_at_[hidden])
Date: 2010-11-16 12:17:41


On 11/16/2010 10:50 AM, Vladimir Prus wrote:
> On Tuesday, November 16, 2010 18:24:22 Edward Diener wrote:
>
>> Sure<g> ! Here are some irritating questions, honestly asked.
>>
>> Where is the BOOST environment variable documented and what does it
>> point to ?
>
> I am not aware of such environment variable.
>
>>
>> Where is the BOOST_ROOT environment variable documented and what does it
>> point to ?
>
> I am not aware of such environment variable either. Any Jamfile inside the
> official boost tree can use the BOOST_ROOT variable (which is Jam variable,
> not environment variable), which is defined in Jamroot via path-constant,
> as the path of Jamroot's directory.
>
>> There is also a BOOST_BUILD_PATH environment variable mentioned in the
>> Boost Build documentation but there is no mention there what it means,
>> although I gather from another comment that it points to the Boost Build
>> v2 subdirectory of some Boost tree.
>
> The value of BOOST_BUILD_PATH *environment variable* specifies where
> to find *.jam files. Unless you have written your custom .jam files, you
> should not need to set it to anything.
>
>> Shouldn't there be some central place in the Boost documentation where
>> all the environment variables used by BOOST, which may or may not need
>> to be set, are actually documented for easy understanding.
>
> There should be such a page, though none of environment variable you
> have listed above actually need to be ever set when building official
> Boost.
>
> I would agree that the official approach for making sandbox libraries
> find Boost is desired -- did you look at Daniel's example?

I have now looked at it. But sandbox libraries which I hope to build
from a directory outside a Boost tree do not use this technique.

I will try to add the Jamfile.v2 and project-root.jam from Daniel's
example to such sandbox libraries, which do not have them, at their root
level and hopefully this will allow a sandbox library to build from
outside of a Boost installation tree. But I still have the question:

How do I point to a particular Boost installation tree from such a
sandbox library which is outside any Boost installation ?

John Maddock's answer is that if I want to do this permanently for a
Boost installation, such as my copy of the latest Boost trunk, I can use
the BOOST environment variable to do this. While if I want to have the
flexibility of specifying the Boost installation each time I can use the
--boost=path command line option where 'path' points to the Boost
installation I want to use. I am also assuming that using the command
line option overrides any BOOST environment variable I set. I will
assume this is correct unless told otherwise.

So I would assume the official approach, perhaps to be documented
somewhere, is to use the Jamfile.v2 and project-root.jam from Daniel's
example and to use the methodology explained by John.


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