Boost logo

Boost-Build :

Subject: Re: [Boost-build] Order of include directories in Boost Build
From: Nogradi, Chris (Chris.Nogradi_at_[hidden])
Date: 2011-02-10 17:36:10

I saw this in the manual:

How to control properties order?

For internal reasons, Boost.Build sorts all the properties alphabetically. This means that if you write:

exe a : a.cpp : <include>b <include>a ;

then the command line with first mention the a include directory, and then b, even though they are specified in the opposite order. In most cases, the user does not care. But sometimes the order of includes, or other properties, is important. For such cases, a special syntax is provided:

exe a : a.cpp : <include>a&&b ;

The && symbols separate property values and specify that their order should be preserved. You are advised to use this feature only when the order of properties really matters and not as a convenient shortcut. Using it everywhere might negatively affect performance.

Hope it helps!


-----Original Message-----
From: boost-build-bounces_at_[hidden] [mailto:boost-build-bounces_at_[hidden]] On Behalf Of Edward Diener
Sent: Thursday, February 10, 2011 4:31 PM
To: boost-build_at_[hidden]
Subject: [Boost-build] Order of include directories in Boost Build

In a sandbox project, which has many of the same header files as a
same-named Boost distribution directory, I want to run the tests so that
the include directories are picked up first from the sandbox project and
then from the Boost distribution which BOOST_ROOT and/or BOOST point to.

I even put a jamfile in the top-level sandbox directory which is:

project sandboxlibrary
     : requirements
         build-dir bin.v2

Yet when i try to run the tests the include directory order is:



In other words Boost Build is setting up the command line so that the
Boost distribution comes before the sandbox directory when looking for
include files. Naturally this causes the tests to fail since the changes
in the include files are not being picked up from the sandbox directory

Is this a deficiency or a bug in Boost Build ? Is there any way to work
around this problem ?

It does seem as if one should always be able to run Boost Build from an
outside directory not within a Boost distribution, still picking up
files as necessary from a Boost distribution, and having the sandbox
files found first before the Boost distribution files.

Unsubscribe & other changes:

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient. If you are not the intended recipient, please be aware that any disclosure, copying, distribution or use of this e-mail or any attachment is prohibited. If you have received this e-mail in error, please contact the sender and delete all copies.

Thank you for your cooperation.

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at