2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-14 00:32:11 +00:00

Issue an error when set-default is called with a free or optional feature

[SVN r50391]
This commit is contained in:
Steven Watanabe
2008-12-27 22:04:21 +00:00
parent 9f46413ba8
commit e03ee8a242

View File

@@ -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"