Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50391 - trunk/tools/build/v2/build
From: steven_at_[hidden]
Date: 2008-12-27 17:04:22


Author: steven_watanabe
Date: 2008-12-27 17:04:21 EST (Sat, 27 Dec 2008)
New Revision: 50391
URL: http://svn.boost.org/trac/boost/changeset/50391

Log:
Issue an error when set-default is called with a free or optional feature
Text files modified:
   trunk/tools/build/v2/build/feature.jam | 14 ++++++++++++++
   1 files changed, 14 insertions(+), 0 deletions(-)

Modified: trunk/tools/build/v2/build/feature.jam
==============================================================================
--- trunk/tools/build/v2/build/feature.jam (original)
+++ trunk/tools/build/v2/build/feature.jam 2008-12-27 17:04:21 EST (Sat, 27 Dec 2008)
@@ -161,6 +161,20 @@
 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"


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk