diff --git a/src/build/feature.jam b/src/build/feature.jam index f2960a5ef..4982524a4 100644 --- a/src/build/feature.jam +++ b/src/build/feature.jam @@ -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"