Add support for modular build structure. (#24)

* Make the library modular usable.

* Switch to library requirements instead of source. As source puts extra source in install targets.

* Add missing b2 testing module import.

* Add missing import-search for cconfig/predef checks.

* Add requires-b2 check to top-level build file.

* Bump B2 require to 5.2

* Update copyright dates.

* Move inter-lib dependencies to a project variable and into the build targets.

* Update build deps.
This commit is contained in:
René Ferdinand Rivera Morell
2024-08-18 17:25:34 -05:00
committed by GitHub
parent 804767983f
commit a54b2619f8
3 changed files with 36 additions and 4 deletions

27
build.jam Normal file
View File

@ -0,0 +1,27 @@
# 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 :
/boost/config//boost_config
/boost/core//boost_core
/boost/preprocessor//boost_preprocessor
/boost/static_assert//boost_static_assert
/boost/type_traits//boost_type_traits ;
project /boost/detail
: common-requirements
<include>include
;
explicit
[ alias boost_detail : : : : <library>$(boost_dependencies) ]
[ alias all : boost_detail test ]
;
call-if : boost-library detail
;

View File

@ -23,7 +23,7 @@ boostbook standalone
<xsl:param>generate.section.toc.level=3
<xsl:param>chunk.section.depth=2
#<xsl:param>chunk.first.sections=1
<dependency>images
<dependency>callouts
<dependency>css

View File

@ -5,10 +5,14 @@
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
################################################################################
import testing ;
build-project container_fwd ;
project detail/test
: requirements
<library>/boost/detail//boost_detail
<library>/boost/type_traits//boost_type_traits
<c++-template-depth>300
<toolset>clang:<cxxflags>-Wno-unused
<toolset>clang:<cxxflags>-Wno-tautological-compare
@ -18,13 +22,14 @@ project detail/test
;
# import rules for testing conditional on config file variables
import ../../config/checks/config : requires ;
import-search /boost/config/checks ;
import config : requires ;
run binary_search_test.cpp ;
run blank_test.cpp ;
run is_sorted_test.cpp ;
run is_sorted_test.cpp /boost/array//boost_array ;
run numeric_traits_test.cpp ;
run is_xxx_test.cpp ;
run is_xxx_test.cpp /boost/preprocessor//boost_preprocessor ;
# run test_utf8_codecvt.cpp : : : [ requires std_wstreambuf ] ;
run test_utf8_codecvt.cpp ;
run allocator_utilities_test.cpp ;