mirror of
https://github.com/boostorg/build.git
synced 2026-02-14 12:42:11 +00:00
Issue an error when set-default is called with a free or optional feature
[SVN r50391]
This commit is contained in:
@@ -161,6 +161,20 @@ rule feature (
|
||||
rule set-default ( feature : value )
|
||||
{
|
||||
local f = [ grist $(feature) ] ;
|
||||
local a = $($(f).attributes) ;
|
||||
local bad-attribute = ;
|
||||
if free in $(a)
|
||||
{
|
||||
bad-attribute = free ;
|
||||
}
|
||||
else if optional in $(a)
|
||||
{
|
||||
bad-attribute = optional ;
|
||||
}
|
||||
if $(bad-attribute)
|
||||
{
|
||||
errors.error "$(bad-attribute) property $(f) cannot have a default." ;
|
||||
}
|
||||
if ! $(value) in $($(f).values)
|
||||
{
|
||||
errors.error "The specified default value, '$(value)' is invalid"
|
||||
|
||||
Reference in New Issue
Block a user