Boost logo

Geometry :

Subject: [ggl] Fixing Boost location in Jamfiles
From: Mateusz Loskot (mateusz)
Date: 2010-03-10 19:53:56

Barend Gehrels wrote:
> Mateusz Loskot wrote:
>> So, if we set the <source>/boost//headers in Jamfiles of tests/examples
>> then users will be able to build them having the Boost.Geometry tree
>> outside Boost sources tree. I think it's a good idea to allow it
>> as it's convenient. I work like that myself having
>> /path/to/boost/svn/sandbox/geometry
>> /path/to/boost/svn/trunk
>> Once we move the Geometry to Boost tree, we can replace the
>> "/boost//headers" with relative paths as other Boost libraries do.
>> Specifically, we replace it with: <include>../../..
> Yes, but I still don't understand. The exact <include>../../.. is
> already there. All is designed and configured to be taken up into the
> Boost tree... So why should we modify the Jamfiles for Boost.Geometry
> for just one or two months? That sounds inconvenient to me.
> But I'm glad to know the "official way" to do this, strange that it is
> not documented (or at least on the first pages). Just glanced through
> the examples in ...\tools\build\v2\example , and no example is using
> Boost! Of course the hello world compiles (it did for me last night),
> but there are no examples there which are using Boost. I thought that
> Boost.Build was made to build Boost... A "hello boost" would be
> convenient...

Hi Barend,

As you know I have asked [1] for clarification on the boost devel list
and Volodya replied with final explanation [2]


I include this part below:

Vladimir Prus wrote:
> Mateusz Loskot wrote:
> How should I configure Jamfiles of Boost Geometry (examples and tests)
> to locate Boost headers in the following two situations:
> 1) User copies Boost Geometry in to Boost tree and compiles
> examples and tests
> 2) User keeps Boost Geometry outside Boost tree and still should be
> able to compile examples and tests using his Boost installation.

Both cases can be handled by adding /boost//headers in the sources of
your library. In case (2) it will work because user-config.jam has
'use-project' -- as discussed on IRC. Case (1) will work as well,
because Jamroot has this:

        project boost : ...

which also makes "/boost" a valid project id.

It's worth checking the whole thread anyway.

Best regards,

Mateusz Loskot,
Charter Member of OSGeo,

Geometry list run by mateusz at