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

Bugfix. When calling feature.expand on

<toolset-msvc:version>7.1 <toolset>msvc

we used to get error if default value of <toolset-msvc:version> is 6.0.

* build/feature.jam
  (expand-subfeatures-aux): Do no apply subfeature defaults, since it causes
  the above troubles and is also performed in 'add-defaults'.


[SVN r22607]
This commit is contained in:
Vladimir Prus
2004-04-06 08:11:09 +00:00
parent 4073b99371
commit 89ef8296da

View File

@@ -342,21 +342,6 @@ local rule expand-subfeatures-aux (
result += $(subvalue:G=$(f)-$(subfeature)) ;
}
}
# Add all the default feature values for non-optional subfeatures.
local ungristed-feature = [ utility.ungrist $(feature) ] ;
for local s in $($(feature).subfeatures)
{
local full-name = <$(ungristed-feature)-$(s)> ;
if ! optional in $($(full-name).attributes)
&& [ is-subfeature-of $(result[1]) $(full-name) ]
{
if ! $(full-name) in $(result:G)
{
result += $(full-name)$($(full-name).default) ;
}
}
}
return $(result) ;
}
@@ -1031,7 +1016,7 @@ local rule __test__ ( )
extend-feature toolset : msvc metrowerks ;
subfeature toolset gcc : version : 2.95.2 2.95.3 2.95.4
3.0 3.0.1 3.0.2 : optional ;
3.0 3.0.1 3.0.2 ;
assert.result <toolset-gcc:version>
: select-subfeatures <toolset>gcc
@@ -1053,19 +1038,15 @@ local rule __test__ ( )
assert.result <toolset>gcc <toolset-gcc:version>3.0.1
: expand-subfeatures <toolset>gcc-3.0.1 ;
assert.result <toolset>gcc <toolset-gcc:version>3.0.1
: expand <toolset>gcc <toolset-gcc:version>3.0.1 ;
assert.result <define>foo=x-y
: expand-subfeatures <define>foo=x-y ;
assert.result <toolset>gcc <toolset-gcc:version>3.0.1
: expand-subfeatures gcc-3.0.1 ;
feature dummy : dummy1 dummy2 ;
subfeature dummy : subdummy : x y z : optional ;
feature fu : fu1 fu2 : optional ;
subfeature fu : subfu : x y z : optional ;
subfeature fu : subfu2 : q r s ;
assert.result a c e
: get-values <x> : <x>a <y>b <x>c <y>d <x>e ;
@@ -1074,10 +1055,6 @@ local rule __test__ ( )
<variant>debug <define>_DEBUG <optimization>on
: expand gcc-3.0.1 debug <optimization>on
;
assert.result <fu>fu1 <fu-subfu2>q
: expand-subfeatures <fu>fu1
;
assert.result <variant>debug <define>_DEBUG <optimization>on
: expand debug <optimization>on
@@ -1090,17 +1067,25 @@ local rule __test__ ( )
assert.result <runtime-link>dynamic <optimization>on
: defaults <runtime-link> <define> <optimization>
;
feature dummy : dummy1 dummy2 ;
subfeature dummy : subdummy : x y z : optional ;
feature fu : fu1 fu2 : optional ;
subfeature fu : subfu : x y z : optional ;
subfeature fu : subfu2 : q r s ;
assert.result <runtime-link>static <define>foobar <optimization>on <toolset>gcc:<define>FOO
<toolset>gcc <variant>debug <stdlib>native <dummy>dummy1
<toolset>gcc <variant>debug <stdlib>native <dummy>dummy1 <toolset-gcc:version>2.95.2
: add-defaults <runtime-link>static <define>foobar
<optimization>on <toolset>gcc:<define>FOO
;
assert.result <runtime-link>static <define>foobar <optimization>on <toolset>gcc:<define>FOO
<fu>fu1 <toolset>gcc <variant>debug <stdlib>native <dummy>dummy1 <fu-subfu2>q
<fu>fu1 <toolset>gcc <variant>debug <stdlib>native <dummy>dummy1 <fu-subfu2>q
<toolset-gcc:version>2.95.2
: add-defaults <runtime-link>static <define>foobar
<optimization>on <toolset>gcc:<define>FOO <fu>fu1
;