From a54b2619f8f75861836114d02a3fc70c7c9b3474 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Ferdinand=20Rivera=20Morell?= Date: Sun, 18 Aug 2024 17:25:34 -0500 Subject: [PATCH] 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. --- build.jam | 27 +++++++++++++++++++++++++++ doc/build.jam | 2 +- test/Jamfile | 11 ++++++++--- 3 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 build.jam diff --git a/build.jam b/build.jam new file mode 100644 index 0000000..03f2c9e --- /dev/null +++ b/build.jam @@ -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 + ; + +explicit + [ alias boost_detail : : : : $(boost_dependencies) ] + [ alias all : boost_detail test ] + ; + +call-if : boost-library detail + ; + diff --git a/doc/build.jam b/doc/build.jam index 5149cfd..3607a90 100644 --- a/doc/build.jam +++ b/doc/build.jam @@ -23,7 +23,7 @@ boostbook standalone generate.section.toc.level=3 chunk.section.depth=2 #chunk.first.sections=1 - + images callouts css diff --git a/test/Jamfile b/test/Jamfile index 53c60ec..a3f69aa 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -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 + /boost/detail//boost_detail + /boost/type_traits//boost_type_traits 300 clang:-Wno-unused clang:-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 ;