Subject: Re: [Boost-build] switching on toolset
From: Robert Ramey (ramey_at_[hidden])
Date: 2015-06-22 11:25:35
On 6/22/15 4:39 AM, Vladimir Prus wrote:
> you've made the same point earlier.
I know, but it wasn't helpful.
> So, if you're interesting in improving things, could you act on earlier
> responses, please?
Stephan said he needed more specific suggestion. Here's a specific one.
On 6/16/15 3:54 PM, Gennadiy Rozental wrote:
> I'd like specify different requirement (cxxflags specifically) depending on
> which toolset I am running against.
> I know I specify multiple entries in requirements for each toolset, but I'd
> rather have some if statement which explicit state what i mean. This is
> especially important to handle various gcc versions. I'd rather not spell
> out each version, but have some conditions on version number.
> Any help appreciated.
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
So I read this as proposal to include logic inside he jamfile which will
select features/attributes of the build environment without the user
having to know what is going on.
I understand the motivation - it's so that the build "just works"
I also believe that doing such a thing is a bad idea. The basic
a) it will sometimes fail. Then the user will have to delve into the
bjam code which he doesn't understand to try and figure out the problem.
b) Any failures are likely unforeseeable. Hence when it fails it will
not be obvious where the source of the failure is. This will cause the
user, even more difficulty.
c) Its totally unclear what happens if there is a conflict between the
switches used on the command line and the switches automatically added
in by the jamfile. Which would take precedence? would this internal
logic drop switches I've specifically requested?. Would it add switches
I don't know about? What would it do? How would I find this out?
d) what happens when I invoke b2 for the whole of boost with some set of
switches. Now would some libraries get built with one set of switches
and other libraries get built with a different set? How would I know
what's getting built with what? Suppose one library uses another
library, how do we know that there won't be any incompatibilities? If
there are any, and they show up later in the process when I try to use
the libraries, How will we track down the source? And how will we fix
What I suggest is that if there is some sort of requirements related to
the selection of toolset options/features/attributes which cannot be
supported, the the bjam code just detect them and bail with an error
message which tells the user what he did wrong and maybe how to fix it.
This avoids the problems above.
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