Boost logo

Boost-Build :

From: Juergen Hunold (hunold_at_[hidden])
Date: 2005-06-27 14:36:05

Hi Dave !

On Saturday 25 June 2005 15:01, David Abrahams wrote:
> Jürgen Hunold <hunold_at_[hidden]> writes:
> > This boils down to Boost.Test,
> > which contains
> >
> > alias minimal : : : :
> > <toolset>msvc:<asynch-exceptions>on
> >
> > which Boost.Build tries to build, because it is not explicit.
> What's weird about this is:
> What does it mean to build an alias??!

Well, I'm sorry, the right term would have been "evaluated".

> I think the right fix would address that problem.

Okay, I'll try to explain this more carefully.

It all starts in $BOOST_ROOT/Jamfile.v2 line 191

-------- snip ------------------
# Just build the libraries, don't install them anywhere.
# This is what happend with just "bjam --v2".
alias build_all : libs/$(libraries)/build ;

When doing a <use>/boost in my own Jamfiles, V2 therefore evaluates
_all_ Jamfiles.v2 in _all_ $libraries.

This "feature" can be disabled by making "build_all" explicit. But then
the usage-requirements of Boost are not added to the properties of my
projects. This was the trap I ran into last week...

In case of Boost.Test V2 then scans libs/test/Jamfile.v2 and finds the
minimal alias. This normally looks

> > alias minimal : : : :
> > <toolset>msvc:<asynch-exceptions>on

and If I comment the "::::" line I get the more readable

alias minimal
: # sources
: # requirements
: # default-build
: # usage-requirements

This declares an alias which has an usage-requirement which is then
dutifully added to the property set of _my_ projects.

In the normal case (<exception-handling>on) this adds
<asynch-exceptions>on to _my_ project.
Pretty cool, isn't it ?
And this leads to:

> > cl : Command line warning D4025 : overriding '/EHs' with '/EHa'
> > baseio.cpp
> > This is clearly a misconfiguration and also fixed by the patch.

Or course this adds "asynch-exceptions-on" the build-path, too.

When building with <exception-handling>off , "minimal" also injects
<asynch-exceptions>on in my project and V2 then correctly detects that
it can't build this combination.

> How does the patch fix that? It's non-obvious to me.

Making "minimal" explicit prevents V2 from evaluating it and addings its
usage-requirements to my projects.

I've had several discussions with Volodya about this behaviour.
It has more pros then cons and I would not mess with it before 1.33.0 is
out and then its frozen anyway.
So, please:

1. Remove "minimal" or document what it is for and where it is used.
2. make it explicit and document it.



* Dipl.-Math. Jürgen Hunold ! Institut für Verkehrswesen, Eisenbahnbau
* voice: ++49 511 762-2529 ! und -betrieb, Universität Hannover 
* fax : ++49 511 762-3001 ! Appelstrasse 9a, D-30167 Hannover
* hunold_at_[hidden] !

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