Boost logo

Boost-Build :

From: David Abrahams (gclbb-jamboost_at_[hidden])
Date: 2003-07-18 18:07:48

Vladimir Prus <ghost_at_[hidden]> writes:

> Hello,
> I'd like to tighten up the rules for conditional requirements.
> Consider:
> exe a : a.cpp :
> <variant>debug:<optimization>speed
> <optimization>off:<define>USE_SLOW_BUT_TESTED_ALGORITHM
> ;
> Now, someone just calls "bjam" and "a" will be built with default properties:
> "<variant>debug <optimization>off". Requirements are evaluated and the result
> is that <optimization>speed is used and <define>USE_SLOW_BUT_TESTED_ALGORITHM
> is added.
> And that's confusing! I'd expect the target to be build either with
> <optimization>speed or <optimization>off and <define> to appear only in
> second case. But the target is build with <optimization>off and <define>.
> IOW, one conditional requirements changes property used as condition for
> another.

This is just one example of why Ali and I wanted to define
conditional properties to be evaluated in order. It's really easy to
imagine other cases. For example,

on platforms X,Y, and Z use toolset A
and on toolset A define FOOBAR

> I think the simplest solution is to declare that in conditional
> property, part after ":" can be only free or incidental

Why would you want to impose that limitation?

> and that free/incidental features cannot be present before
> ":". Opinions? Anybody using non-free conditional properties?

I don't know; this sounds terribly limiting to me.

Dave Abrahams
Boost Consulting

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