diff --git a/boostcpp.jam b/boostcpp.jam index dc7af601cc..7af4bc77ac 100644 --- a/boostcpp.jam +++ b/boostcpp.jam @@ -684,15 +684,11 @@ rule deduce-address-model ( properties * ) { local result ; local filtered = [ toolset-properties $(properties) ] ; - - if [ configure.builds /boost/architecture//32 : $(filtered) : 32-bit ] - { - result = 32 ; - } - else if [ configure.builds /boost/architecture//64 : $(filtered) : 64-bit ] - { - result = 64 ; - } + local names = 32 64 ; + local idx = [ configure.find-builds "default address-model" : $(filtered) + : /boost/architecture//32 "32-bit" + : /boost/architecture//64 "64-bit" ] ; + result = $(names[$(idx)]) ; if $(result) { @@ -721,30 +717,15 @@ rule deduce-architecture ( properties * ) { local result ; local filtered = [ toolset-properties $(properties) ] ; - if [ configure.builds /boost/architecture//arm : $(filtered) : arm ] - { - result = arm ; - } - else if [ configure.builds /boost/architecture//mips1 : $(filtered) : mips1 ] - { - result = mips1 ; - } - else if [ configure.builds /boost/architecture//power : $(filtered) : power ] - { - result = power ; - } - else if [ configure.builds /boost/architecture//sparc : $(filtered) : sparc ] - { - result = sparc ; - } - else if [ configure.builds /boost/architecture//x86 : $(filtered) : x86 ] - { - result = x86 ; - } - else if [ configure.builds /boost/architecture//combined : $(filtered) : combined ] - { - result = combined ; - } + local names = arm mips1 power sparc x86 combined ; + local idx = [ configure.find-builds "default architecture" : $(filtered) + : /boost/architecture//arm + : /boost/architecture//mips1 + : /boost/architecture//power + : /boost/architecture//sparc + : /boost/architecture//x86 + : /boost/architecture//combined ] ; + result = $(names[$(idx)]) ; if $(result) {