mirror of
https://github.com/boostorg/atomic.git
synced 2026-01-19 16:12:09 +00:00
Add support for modular build structure. (#69)
* Make the library modular usable. * Switch to library requirements instead of source. As source puts extra source in install targets. * Add missing NO_LIB usage requirements. * Add requires-b2 check to top-level build file. * Update dependencies. * Bump B2 require to 5.2 * Update copyright dates. * Move inter-lib dependencies to a project variable and into the build targets. * Split b2 dependencies into public and private. * Be explicit about the kind of public dependencies and make the winapi be conditional on windows target-os.
This commit is contained in:
committed by
GitHub
parent
54bbc34960
commit
0ed0a5db0c
24
build.jam
Normal file
24
build.jam
Normal file
@@ -0,0 +1,24 @@
|
||||
# Copyright René Ferdinand Rivera Morell 2023-2024
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
require-b2 5.2 ;
|
||||
|
||||
constant boost_dependencies :
|
||||
<library>/boost/assert//boost_assert
|
||||
<library>/boost/config//boost_config
|
||||
<library>/boost/predef//boost_predef
|
||||
<library>/boost/type_traits//boost_type_traits
|
||||
<target-os>windows:<library>/boost/winapi//boost_winapi ;
|
||||
|
||||
project /boost/atomic ;
|
||||
|
||||
explicit
|
||||
[ alias boost_atomic : build//boost_atomic ]
|
||||
[ alias all : boost_atomic test ]
|
||||
;
|
||||
|
||||
call-if : boost-library atomic
|
||||
: install boost_atomic
|
||||
;
|
||||
@@ -7,6 +7,8 @@
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
import-search /boost/config/checks ;
|
||||
|
||||
import common ;
|
||||
import config : requires ;
|
||||
import path ;
|
||||
@@ -15,12 +17,6 @@ import feature ;
|
||||
import configure ;
|
||||
import atomic-arch-config ;
|
||||
|
||||
local here = [ modules.binding $(__name__) ] ;
|
||||
|
||||
project.push-current [ project.current ] ;
|
||||
project.load [ path.join [ path.make $(here:D) ] ../../config/checks/architecture ] ;
|
||||
project.pop-current ;
|
||||
|
||||
lib synchronization ;
|
||||
explicit synchronization ;
|
||||
|
||||
@@ -47,8 +43,13 @@ local cxx_requirements = [ requires
|
||||
cxx11_static_assert
|
||||
] ;
|
||||
|
||||
project boost/atomic
|
||||
project
|
||||
: common-requirements
|
||||
<include>../include
|
||||
$(boost_dependencies)
|
||||
: requirements
|
||||
<library>/boost/align//boost_align
|
||||
<library>/boost/preprocessor//boost_preprocessor
|
||||
<include>../src
|
||||
<threading>multi
|
||||
<link>shared:<define>BOOST_ATOMIC_DYN_LINK=1
|
||||
@@ -59,6 +60,7 @@ project boost/atomic
|
||||
: usage-requirements
|
||||
<link>shared:<define>BOOST_ATOMIC_DYN_LINK=1
|
||||
<link>static:<define>BOOST_ATOMIC_STATIC_LINK=1
|
||||
<define>BOOST_ATOMIC_NO_LIB=1
|
||||
: source-location ../src
|
||||
;
|
||||
|
||||
@@ -150,5 +152,3 @@ lib boost_atomic
|
||||
<conditional>@check-synchronization-lib
|
||||
$(cxx_requirements)
|
||||
;
|
||||
|
||||
boost-install boost_atomic ;
|
||||
|
||||
@@ -19,23 +19,23 @@ rule deduce-architecture ( properties * )
|
||||
}
|
||||
else
|
||||
{
|
||||
if [ configure.builds /boost/architecture//x86 : $(properties) : "x86" ]
|
||||
if [ configure.builds /boost/config/checks/architecture//x86 : $(properties) : "x86" ]
|
||||
{
|
||||
return x86 ;
|
||||
}
|
||||
else if [ configure.builds /boost/architecture//arm : $(properties) : "arm" ]
|
||||
else if [ configure.builds /boost/config/checks/architecture//arm : $(properties) : "arm" ]
|
||||
{
|
||||
return arm ;
|
||||
}
|
||||
else if [ configure.builds /boost/architecture//mips1 : $(properties) : "mips1" ]
|
||||
else if [ configure.builds /boost/config/checks/architecture//mips1 : $(properties) : "mips1" ]
|
||||
{
|
||||
return mips1 ;
|
||||
}
|
||||
else if [ configure.builds /boost/architecture//power : $(properties) : "power" ]
|
||||
else if [ configure.builds /boost/config/checks/architecture//power : $(properties) : "power" ]
|
||||
{
|
||||
return power ;
|
||||
}
|
||||
else if [ configure.builds /boost/architecture//sparc : $(properties) : "sparc" ]
|
||||
else if [ configure.builds /boost/config/checks/architecture//sparc : $(properties) : "sparc" ]
|
||||
{
|
||||
return sparc ;
|
||||
}
|
||||
@@ -51,11 +51,11 @@ rule deduce-address-model ( properties * )
|
||||
}
|
||||
else
|
||||
{
|
||||
if [ configure.builds /boost/architecture//32 : $(properties) : "32-bit" ]
|
||||
if [ configure.builds /boost/config/checks/architecture//32 : $(properties) : "32-bit" ]
|
||||
{
|
||||
return 32 ;
|
||||
}
|
||||
else if [ configure.builds /boost/architecture//64 : $(properties) : "64-bit" ]
|
||||
else if [ configure.builds /boost/config/checks/architecture//64 : $(properties) : "64-bit" ]
|
||||
{
|
||||
return 64 ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user