From: Phillip Seaver (phil_at_[hidden])
Date: 2007-07-26 19:28:20
Jeffrey Holle wrote:
> I am using Boost.Build V2 (Milestone 11) Boost.Jam 03.1.15.
> I've discovered a problem when creating an specialized variant.
> I created a variant called wx_release that damps done the optimization
> level to avoid the type-puned casting issues that wxWidgets has.
> Then I discovered that using "<variant>debug:include" no longer worked.
> The work around was to create a wx_debug variant too and use it instead
> of debug.
> If my wx_release variant wasn't defined, the debug variant worked as
I created a <variant-base> property for this purpose -- that way I can
say "<variant-base>release:<define>NDEBUG" and it'll work for both
<variant>release and <variant>profile (which is based on release). See
the attached patch.
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/builtin.jam,v
retrieving revision 1.202
diff -u -r1.202 builtin.jam
--- build/v2/tools/builtin.jam 3 Apr 2007 17:10:53 -0000 1.202
+++ build/v2/tools/builtin.jam 26 Jul 2007 23:24:56 -0000
@@ -254,6 +254,7 @@
feature user-interface : console gui wince native auto ;
feature variant : : implicit composite propagated symmetric ;
+feature variant-base ;
# Declares a new variant.
# First determines explicit properties for this variant, by
@@ -302,10 +303,10 @@
# Add explicitly specified properties for parents
for local p in $(parents)
- # TODO: the check may be sticter
+ # TODO: the check may be stricter
if ! [ feature.is-implicit-value $(p) ]
- error "Invalid base varaint" $(p) ;
+ error "Invalid base variant" $(p) ;
inherited += $(.explicit-properties.$(p)) ;
@@ -313,6 +314,12 @@
property.validate $(explicit-properties) ;
explicit-properties = [ property.refine $(inherited) : $(explicit-properties) ] ;
+ if ! $(parents)
+ feature.extend variant-base : $(name) ;
+ explicit-properties += <variant-base>$(name) ;
# Record explicitly specified properties for this variant
# We do this after inheriting parents' properties, so that
# they affect other variants, derived from this one.
Boost-Build 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