|
Boost-Build : |
Subject: Re: [Boost-build] Sorting include headers
From: Alexander Sack (pisymbol_at_[hidden])
Date: 2008-10-15 15:06:22
On Wed, Oct 15, 2008 at 2:59 PM, Steven Watanabe <watanabesj_at_[hidden]> wrote:
> AMDG
>
> Alexander Sack wrote:
>>>
>>> The same kind of problem has hit us a few times. I usually try to fix
>>> the code, because it just seems like a never-ending problem otherwise.
>>> It can be a pain, but so are "random" compile problems when the order of
>>> headers changes or a new library comes in with the same name.
>>>
>>
>> Yeah totally agree with you Philip but in order to evangelize a build
>> tool I have to at least proof that bjam can build the exact pieces of
>> code that autoconf and friends can (a true source of industry
>> evilness).
>>
>
> All right. how should include ordering work?
At the bare minimum bjam should honor the order the rules were written
in or at least provide a simple build feature that allows for this.
Other than some performance gains in set comparisons, I don't see why
you wouldn't have this.
> I don't think that it is a good idea to rely on
> the order implicitly as include directories can be
> specified in many different places. If it actually matters,
> the dependencies should be explicit.
Though I agree in principle that code should be written better and
namespace pollution should be avoided, the fact is if you want folks
to adopt bjam it has to deal with projects already in place.
> Here's my best guess about the semantics:
>
> a) It should be possible to say that one include directory comes before
> another.
> b) It should be possible to say that all the include directories in some
> group
> come before all the directories in another group.
Absolutely.
> c) If a directory is specified more than once it should only be put in
> the command line once and should obey the union of all constraints on it.
> d) These constraints need to encoded in the property-set somehow--they
> can't be global, as different targets may need different constraints.
> e) It should at least be possible to make directories specified on
> the command line come before directories that come from the jamfiles.
What's the purpose of the last one with respect to this context?
-aps
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