Changes between Version 9 and Version 10 of AlternativeSelection


Ignore:
Timestamp:
Mar 26, 2007, 5:49:56 AM (19 years ago)
Author:
Dave Abrahams
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AlternativeSelection

    v9 v10  
    5555Indeed, the error message didn't say "there's no matching alternative;" it said there's "no ''best'' alternative."  Whether or not we accept this proposal turns on how we define "best."  I propose that in example 1, the fact that alternative 2 matches an ''explicitly specified'' build property should make it "better" than alternative 1.
    5656
     57=== Example 3 ===
    5758
     59This example is a simplified, but equivalent, version of the example in ticket #16:
     60
     61{{{
     62lib test : : <name>test <toolset>gcc <threading>multi ;
     63lib test : : <name>test.lib <toolset>msvc <threading>multi ;
     64}}}
     65
     66a simple "{{{bjam toolset=gcc}}}" currently yields:
     67
     68{{{
     69error: No best alternative for ./test
     70    next alternative: required properties: <threading>multi <toolset>gcc
     71        not matched
     72    next alternative: required properties: <threading>multi <toolset>msvc
     73        not matched
     74}}}
     75
     76Here Boost.Build complains because the {{{<threading>single}}} is the default.  If you read ticket #16, you can see that the intended result was that Boost.Build choose the first alternative.  My proposed change would accomplish that with no change in the Jamfile.  We would lose the capability of specifying these alternatives in such a way that the build request {{{bjam toolset=gcc}}} causes an error.