Boost logo

Boost-Build :

Subject: Re: [Boost-build] [Boost.Build] Difficulties with conditional targets based on address-model
From: Moritz Hassert (mhassert_at_[hidden])
Date: 2014-01-09 12:01:02


Hi Steven,

Am Freitag, den 03.01.2014, 11:04 +0000 schrieb Steven Barbaglia:
> Invocation (used in a VS2013 x64 Cross Tools Command Prompt window):
> b2 --toolset=msvc --address-model=64

Please try without "--":
"b2 toolset=msvc address-model=64"

> Outcome:
> error: No best alternative for ./maybeB
> next alternative: required properties: <address-model>32
> not matched
> next alternative: required properties: <address-model>64
> not matched
> error: No best alternative for ./maybeB
> next alternative: required properties: <address-model>32
> not matched
> next alternative: required properties: <address-model>64
> not matched

"--address-model=64" is completely ignored. "address-model" has no
default value, so its value is unset and matches neither
<address-model>32 nor <address-model>32.

> Notes
> The use of the address-model in the first alternative for maybeB is not
> needed, but was introduced to highlight the "No best alternative" error,
> a possible clue to the problem. The 64-bit alternative is never chosen,
> even when using the more conventional definition with no required
> properties in the first alternative for maybeB.

You're right, it should not be needed.
In this case, the 64-bit alternative is never chosen, because
"address-model" is not set so the first alternative without
"address-model" is the only exact (and therefore best) match.

> If I remove the first alternative for maybe, then 64-bit builds include
> B, but unfortunately also 32-bit builds include B (no error reported).
> Using "Boost.Build 2011.12-svn"

When there is only one alternative and it's requirements do not
contradict what is requested ("--address-model=32" is ignored!, see
above), that alternative is the "best match".
This:
"b2 toolset=msvc address-model=32"
should give you an error.

Regards
Moritz

Geschaeftsfuehrer: Dipl.-Inform. Christopher Asp
Amtsgericht Mannheim HRB 105845


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