Boost logo

Boost-Build :

Subject: Re: [Boost-build] Order of include directories in Boost Build
From: Edward Diener (eldiener_at_[hidden])
Date: 2011-02-10 17:57:08


On 2/10/2011 5:36 PM, Nogradi, Chris wrote:
> 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!

Even after changing the bjam file at the top-level sandbox library to read:

project sandboxlibrary
     : requirements
         <include>.&&$(BOOST_ROOT)
     :
         build-dir bin.v2
     ;

the include order is still the same wrong one it was before.

>
> Chris
>
> -----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
> <include>.
> <include>$(BOOST_ROOT)
> :
> build-dir bin.v2
> ;
>
> Yet when i try to run the tests the include directory order is:
>
> "-IC:\Programming\VersionControl\boost"
>
> "-IC:\Programming\VersionControl\sandbox\sandboxlibrary"
>
> 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
> first.
>
> 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: http://lists.boost.org/mailman/listinfo.cgi/boost-build
>
>
> 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.
>
> _______________________________________________
> Unsubscribe& other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
>


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