mirror of
https://github.com/boostorg/boost.git
synced 2025-04-13 08:33:00 +00:00
Lift architecture detection
This commit is contained in:
parent
e99236cf4f
commit
e3bc35f789
2 changed files with 73 additions and 2 deletions
7
Jamroot
7
Jamroot
|
@ -136,7 +136,8 @@ constant BOOST_JAMROOT_MODULE : $(__name__) ;
|
|||
|
||||
boostcpp.set-version $(BOOST_VERSION) ;
|
||||
|
||||
|
||||
use-project /boost/architecture : libs/config/checks/architecture ;
|
||||
|
||||
local all-headers =
|
||||
[ MATCH .*libs/(.*)/include/boost : [ glob libs/*/include/boost ] ] ;
|
||||
|
||||
|
@ -162,6 +163,10 @@ if $(all-headers)
|
|||
|
||||
project boost
|
||||
: requirements <include>.
|
||||
|
||||
[ boostcpp.architecture ]
|
||||
[ boostcpp.address-model ]
|
||||
|
||||
# Disable auto-linking for all targets here, primarily because it caused
|
||||
# troubles with V2.
|
||||
<define>BOOST_ALL_NO_LIB=1
|
||||
|
|
68
boostcpp.jam
68
boostcpp.jam
|
@ -22,7 +22,7 @@ import project ;
|
|||
import regex ;
|
||||
import set ;
|
||||
import targets ;
|
||||
|
||||
import property ;
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
|
@ -553,3 +553,69 @@ rule declare-targets ( all-libraries * : headers * )
|
|||
|
||||
declare_top_level_targets $(libraries) : $(headers) ;
|
||||
}
|
||||
|
||||
rule deduce-address-model ( properties * )
|
||||
{
|
||||
local result = [ property.select <address-model> : $(properties) ] ;
|
||||
if $(result)
|
||||
{
|
||||
return $(result) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
if [ configure.builds /boost/architecture//32 : $(properties) : 32-bit ]
|
||||
{
|
||||
return <address-model>32 ;
|
||||
}
|
||||
else if [ configure.builds /boost/architecture//64 : $(properties) : 64-bit ]
|
||||
{
|
||||
return <address-model>64 ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rule address-model ( )
|
||||
{
|
||||
return <conditional>@boostcpp.deduce-address-model ;
|
||||
}
|
||||
|
||||
rule deduce-architecture ( properties * )
|
||||
{
|
||||
local result = [ property.select <architecture> : $(properties) ] ;
|
||||
if $(result)
|
||||
{
|
||||
return $(result) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
if [ configure.builds /boost/architecture//arm : $(properties) : arm ]
|
||||
{
|
||||
return <architecture>arm ;
|
||||
}
|
||||
else if [ configure.builds /boost/architecture//mips1 : $(properties) : mips1 ]
|
||||
{
|
||||
return <architecture>mips1 ;
|
||||
}
|
||||
else if [ configure.builds /boost/architecture//power : $(properties) : power ]
|
||||
{
|
||||
return <architecture>power ;
|
||||
}
|
||||
else if [ configure.builds /boost/architecture//sparc : $(properties) : sparc ]
|
||||
{
|
||||
return <architecture>sparc ;
|
||||
}
|
||||
else if [ configure.builds /boost/architecture//x86 : $(properties) : x86 ]
|
||||
{
|
||||
return <architecture>x86 ;
|
||||
}
|
||||
else if [ configure.builds /boost/architecture//combined : $(properties) : combined ]
|
||||
{
|
||||
return <architecture>combined ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rule architecture ( )
|
||||
{
|
||||
return <conditional>@boostcpp.deduce-architecture ;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue