From cac9835201e6ded05ccddf56f065919e31ecdbc7 Mon Sep 17 00:00:00 2001 From: Steven Watanabe Date: Wed, 10 Jan 2018 16:05:45 -0700 Subject: Change the output of the architecture/address-model checks to be less misleading. --- boostcpp.jam | 47 ++++++++++++++--------------------------------- 1 file changed, 14 insertions(+), 33 deletions(-) (limited to 'boostcpp.jam') 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) { -- cgit v1.2.1