Boost logo

Boost-Build :

From: Zbynek Winkler (zwin_at_[hidden])
Date: 2004-03-16 06:38:51

Vladimir Prus wrote:
>>>Ah, but did you ever see the warning. In what case did you see it?
>>That is rather complicated issue... :( I have my feature to define one of 4
>>aritmetic modes for a number library of mine. What I really wanted was to
>>have a feature that could be put in the usage-requirements for this
>>library. But I did not want it to have a certain value. I just wanted it to
>>be set so the user could possibly specify a different value.
> So, you wanted to specify some feature for your library which the user can
> override? Why should it be in usage-requirements?

Well... what is the right way to do it? The library has a header that does
different thing depending on the value of the feature. So in order to use the
library I need the feature to be set. Isn't that what usage-requirements are
for? Only now I do not want a specific value of the feature - just that it is
set with any of the 4 possible values. Then when I try to use the library it
implies that the feature must be set also for the exe. If it is not, then a
default value is used (supplied by the library usage-requirements?). If it
already is, then this value is used for selecting which version of the library
the exe requests. I've found no way how to do it.

>>I've seen the
>>warning while experimenting with this setup and concluded that it was
>>right. After that I made the feature nonoptional because I've found no
>>other way to do it. The problem with that is that I get 4 different builds
>>even for things that do not use the library. Sigh :(
> Yea, that's a problem with no solution so far. But I still don't understand
> where link-compatibility warning goes from.

When I was linking to the library compiled with different value of the feature
than was the one set on the exe. That was why I've set the feature to be
link-incompatible in the first case. Just to prevent this from happening.

>>Great! Thanks. I just hope I am not being pain in t... I understand that
>>bbv2 can use some more testing & bug reporting, right?
> Sure! Testing and bug reporting is very important now and it's interesting to
> see how V2 is used in many ways. Thanks for your contributions!

I'll keep hammering it to see if it can do what I want it to do and if it is
as simple as I would want ;-)


Faculty of Mathematics and Physics, Charles University, Prague, Czech Republic

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