From d5dc15a1f52eaa201bca282ab5a1259568a2a031 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Ferdinand=20Rivera=20Morell?= Date: Wed, 21 Aug 2024 20:51:35 -0500 Subject: [PATCH] Add support for modular build structure. (#121) * Make the library modular usable. * Switch to library requirements instead of source. As source puts extra source in install targets. * 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 | 36 ++++++++++++++++++++++++++++++++++++ test/Jamfile | 46 ++++++++++++++++++++++++---------------------- 2 files changed, 60 insertions(+), 22 deletions(-) create mode 100644 build.jam diff --git a/build.jam b/build.jam new file mode 100644 index 0000000..70b3a5f --- /dev/null +++ b/build.jam @@ -0,0 +1,36 @@ +# 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/assert//boost_assert + /boost/bind//boost_bind + /boost/config//boost_config + /boost/core//boost_core + /boost/function//boost_function + /boost/fusion//boost_fusion + /boost/mpl//boost_mpl + /boost/predef//boost_predef + /boost/preprocessor//boost_preprocessor + /boost/proto//boost_proto + /boost/range//boost_range + /boost/smart_ptr//boost_smart_ptr + /boost/type_traits//boost_type_traits + /boost/utility//boost_utility ; + +project /boost/phoenix + : common-requirements + include + ; + +explicit + [ alias boost_phoenix : : : : $(boost_dependencies) ] + [ alias all : boost_phoenix test ] + ; + +call-if : boost-library phoenix + ; + diff --git a/test/Jamfile b/test/Jamfile index 6b723cf..72dc1ab 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -11,7 +11,8 @@ import testing ; import os ; -import ../../config/checks/config : requires ; +import-search /boost/config/checks ; +import config : requires ; if [ os.environ CI ] { @@ -22,6 +23,7 @@ if [ os.environ CI ] project : requirements + /boost/phoenix//boost_phoenix msvc:_SCL_SECURE_NO_DEPRECATE msvc:_SCL_SECURE_NO_WARNINGS msvc:_CRT_SECURE_NO_DEPRECATE @@ -29,11 +31,11 @@ project $(CI_DEFINES) ; -local multi-threading = /boost/thread +local multi-threading = /boost/thread//boost_thread multi BOOST_ALL_NO_LIB=1 ; test-suite phoenix_core : - [ run core/custom_terminal.cpp ] + [ run core/custom_terminal.cpp /boost/log//boost_log ] [ run core/intel_test.cpp ] [ run core/primitives_tests.cpp ] ; @@ -88,7 +90,7 @@ test-suite phoenix_bind : [ run bind/bind_member_variable_tests.cpp ] [ run bind/bug5782.cpp ] ; - + test-suite phoenix_statement : [ run statement/if_tests.cpp ] [ run statement/loops_tests.cpp ] @@ -96,20 +98,20 @@ test-suite phoenix_statement : [ run statement/exceptions.cpp ] [ run statement/bug5715.cpp ] ; - + test-suite phoenix_container : - [ run container/container_tests1a.cpp ] - [ run container/container_tests1b.cpp ] - [ run container/container_tests2a.cpp ] - [ run container/container_tests2b.cpp ] - [ run container/container_tests3a.cpp ] - [ run container/container_tests3b.cpp ] - [ run container/container_tests4a.cpp ] - [ run container/container_tests4b.cpp ] - [ run container/container_tests5a.cpp ] - [ run container/container_tests5b.cpp ] - [ run container/container_tests6a.cpp ] - [ run container/container_tests6b.cpp ] + [ run container/container_tests1a.cpp ] + [ run container/container_tests1b.cpp ] + [ run container/container_tests2a.cpp ] + [ run container/container_tests2b.cpp ] + [ run container/container_tests3a.cpp ] + [ run container/container_tests3b.cpp ] + [ run container/container_tests4a.cpp ] + [ run container/container_tests4b.cpp ] + [ run container/container_tests5a.cpp ] + [ run container/container_tests5b.cpp ] + [ run container/container_tests6a.cpp ] + [ run container/container_tests6b.cpp ] [ run container/container_tests7a.cpp ] [ run container/container_tests7b.cpp ] [ run container/container_tests8a.cpp ] @@ -176,10 +178,10 @@ test-suite phoenix_algorithm : [ run algorithm/transformation2.cpp ] [ run algorithm/transformation3.cpp ] [ run algorithm/transformation4.cpp ] - [ run algorithm/querying.cpp ] - [ run algorithm/querying_find.cpp ] + [ run algorithm/querying.cpp /boost/assign//boost_assign ] + [ run algorithm/querying_find.cpp /boost/assign//boost_assign ] [ run algorithm/querying2.cpp ] - [ run algorithm/querying_find2.cpp ] + [ run algorithm/querying_find2.cpp /boost/assign//boost_assign ] ; test-suite phoenix_boost_bind_compatibility : @@ -217,7 +219,7 @@ test-suite phoenix_boost_bind_compatibility : test-suite phoenix_bll_compatibility : [ run bll_compatibility/algorithm_test.cpp ] - [ run bll_compatibility/bind_tests_advanced.cpp ] + [ run bll_compatibility/bind_tests_advanced.cpp /boost/any//boost_any ] # [ run bll_compatibility/bind_tests_simple.cpp ] # [ run bll_compatibility/bind_tests_simple_f_refs.cpp ] # [ run bll_compatibility/bll_and_function.cpp ] @@ -242,7 +244,7 @@ test-suite phoenix_regression : [ run regression/bug5626.cpp ] [ run regression/bug5824.cpp ] # [ run regression/bug5875.cpp ] - [ run regression/bug5968.cpp ] + [ run regression/bug5968.cpp /boost/signals2//boost_signals2 ] [ run regression/bug6040.cpp ] [ run regression/bug6268.cpp ] [ run regression/bug7165.cpp ]