Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2002-12-05 11:30:48

David Abrahams wrote:
> Vladimir Prus <ghost_at_[hidden]> writes:
>>David Abrahams wrote:
>>> 2. Is this feature meant to express a preference or a hard
>>> requirement?
>>Preference. You must be able to set it globally, and not to fight
>>with libraries that are available in only one variant.
> In that case it seems very strange to use this as a feature in a
> target's requirements section to indicate whether it is a shared or
> static library.

Why? Specifically, it is strange to use it in *requirements* section.
Or it it strange to use a feature. Or what.

It you're talking about requirements, it's not that strange:

lib a : a.cpp : <shared>true ;

Here, requirements are really requirements: "a" will *always* be built as
shared library. Looking at

exe b : a b.cpp : <static>true ;

Then <static> would be true requirements if it affected "b", but it does not.
However, it is propagated to a. But then, "a"'s requirement cause it to
be built as shared.

It's precisely what I mean by "not hard requirement". I belive that
"hard requirement" in V2 are "link-incompatible" properties.

For example <optimization> is *not* hard requirement, as I see it. If I set it
on exe, it does not mean that dependencies cannot be build with different
values. For example

lib a : a.cpp : <optimization>space ;
exe b : b.cpp a : <optimization>speed ;

<shared> is not different.

- Volodya


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