From 33d4e36a370bf2b2accc97dcdc0d662a6f9978a3 Mon Sep 17 00:00:00 2001 From: Steven Watanabe Date: Thu, 28 Mar 2013 20:57:26 +0000 Subject: [PATCH] Handle known subfeatures in the toolset build request, so we can handle toolset=clang-linux-3.2 for example. [SVN r83623] --- src/build-system.jam | 40 +++++++++++----------------------------- 1 file changed, 11 insertions(+), 29 deletions(-) diff --git a/src/build-system.jam b/src/build-system.jam index 3e145d61b..55f3aeb8c 100644 --- a/src/build-system.jam +++ b/src/build-system.jam @@ -19,6 +19,7 @@ import modules ; import os ; import path ; import project ; +import property ; import property-set ; import regex ; import sequence ; @@ -428,29 +429,17 @@ local rule process-explicit-toolset-requests for local t in $(option-toolsets) $(feature-toolsets) { # Parse toolset-version/properties. - local (t-v,t,v) = [ MATCH (([^-/]+)-?([^/]+)?)/?.* : $(t) ] ; - local toolset-version = $((t-v,t,v)[1]) ; - local toolset = $((t-v,t,v)[2]) ; - local version = $((t-v,t,v)[3]) ; - - if $(.debug-config) - { - ECHO notice: [cmdline-cfg] Detected command-line request for - $(toolset-version): "toolset=" $(toolset) "version=" - $(version) ; - } - - # If the toolset is not known, configure it now. + local toolset = [ MATCH ([^/]+)/?.* : $(t) ] ; + local properties = [ feature.expand-subfeatures $(toolset) : true ] ; + local toolset-property = [ property.select : $(properties) ] ; local known ; - if $(toolset) in [ feature.values ] + if $(toolset-property:G=) in [ feature.values ] { known = true ; } - if $(known) && $(version) && ! [ feature.is-subvalue toolset - : $(toolset) : version : $(version) ] - { - known = ; - } + + # If the toolset is not known, configure it now. + # TODO: we should do 'using $(toolset)' in case no version has been # specified and there are no versions defined for the given toolset to # allow the toolset to configure its default version. For this we need @@ -464,18 +453,11 @@ local rule process-explicit-toolset-requests { if $(.debug-config) { - ECHO "notice: [cmdline-cfg] toolset $(toolset-version) not" + ECHO "notice: [cmdline-cfg] toolset $(toolset) not" "previously configured; attempting to auto-configure now" ; } - toolset.using $(toolset) : $(version) ; - } - else - { - if $(.debug-config) - { - ECHO notice: [cmdline-cfg] toolset $(toolset-version) already - configured ; - } + local t,v = [ MATCH ([^-]+)-?(.+)? : $(toolset) ] ; + toolset.using $(t,v[1]) : $(t,v[2]) ; } # Make sure we get an appropriate property into the build request in