| 36 | | Boost.Build generates an error because the default value of the {{{<profiling>}}} feature is {{{off}}}. It combines that default value with the explicit build request to get {{{<debug-symbols>on <profiling>off}}}, which does not match the 2nd alternative. |
| | 36 | Boost.Build generates an error because the default value of the {{{<profiling>}}} feature is "{{{off}}}". Boost.Build combines that default value with the explicit build request to get {{{<debug-symbols>on <profiling>off}}}, which does not match the 2nd alternative. |
| | 37 | |
| | 38 | ==== Consistency ==== |
| | 39 | |
| | 40 | I know at this point you're probably saying "that makes sense; you asked for something for which there's no alternative with matching requirements." However, "no matching requirements" is currently ''not'' an error when there's only one alternative declared: |
| | 41 | |
| | 42 | {{{ |
| | 43 | lib b : b.cpp : <debug-symbols>off ; |
| | 44 | lib c : c.cpp : <debug-symbols>on <profiling>on ; |
| | 45 | }}} |
| | 46 | |
| | 47 | in this case, {{{bjam debug-symbols=on}}} happily builds both {{{b}}} (with debug-symbols off) and {{{c}}} (with profiling on) despite the fact that the requirements for {{{b}}} directly contradict the explicit build request and that the default for {{{profiling}}}, which is added to the build request, contradicts the requirements for {{{c}}}. |
| | 48 | |
| | 49 | Indeed, the error message didn't say "there's no matching alternative;" it said there's "no ''best'' alternative." This proposal turns on how we define "best." |