Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-03-07 10:36:48


David Abrahams wrote:

> > And what to do in this case:
> >
> > lib l : l.cpp : : <rtti>off ;
> >
> > If we respect default default build, and build request does not include
> > <rtti>off, we'll be using link-incompatible properties for building
> > "l".
>
> When? I thought the new rule was that the target's default value for
> a given feature is used unless the user-supplied default-build
> explicitly contradicts that (?)

The real question is this. Main target gets build-request. First, it applies
default-build. After that, it adds default values for all other features.
Should those default values be present in build request for dependency main
targets. IOW

exe a : a.cpp l ;
lib l : l.cpp : : release ;

When building "a" default value of <variant>, "debug" will be added. If this
value is used in build request to "l", it will be build with <variant>debug
--- which is what currently done, and probably wrong. If we don't pass
<variant>debug to "l", this use case is ok. But in the following case:

exe a : a.cpp l ;
lib l : l.cpp : : <rtti>off ;

"l" will be build with <rtti>off, but "a" -- with <rtti>on.

And, BTW, there's another tricky situation

exe a : a.cpp l : <variant>debug:<inlining>full ;
lib l : l.cpp : : release ;

Here, I'm totally lost. I think it's reasonable to build "l" in release mode.
But.... should <inlining>full be propagete too?

> > Probably the solution is to say that default-build cannot change
> > link incompatible properties.
>
> I don't see why you'd want to say that. Suppose you have a
> "target-architecture" feature. That would be link-incompatible. You
> might want to build for one architecture by default, but allow the
> user to specify a different architecture.

I wanted to prevent the second use case. The "target-architecture" is not
affected. If user specifies nothing, default one is used. If user specifies
something, default build is ignored.

Specifically, I'd like to have error when
1. Build request does not specify a value for some feature
2. The value in default-build is different from default value
3. The feature is link-incompatible.

- Volodya

 


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