From 436e2991f9ad4bb9bbb70b01c688539382197c47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Ferdinand=20Rivera=20Morell?= Date: Sat, 24 Aug 2024 04:35:27 -0500 Subject: [PATCH] Add support for modular build structure. (#29) This is part of the effort to make the Boost libraries "modular" for build and consumption. See https://lists.boost.org/Archives/boost/2024/01/255704.php and https://github.com/grafikrobot/boost-b2-modular/blob/b2-modular/README.adoc for more information. This PR depends on the following other PRs being merged to both develop and master branches of the respective repos: - https://github.com/boostorg/boost/pull/854 This PR will be changed to ready for review, i.e. not draft, when the above are merged. Do not merge this one until that time. --- build.jam | 26 ++++++++++++++++++++++++++ doc/Jamfile.v2 | 4 ++-- test/Jamfile.v2 | 11 +++++++---- test/unique_any/Jamfile.v2 | 4 +++- 4 files changed, 38 insertions(+), 7 deletions(-) create mode 100644 build.jam diff --git a/build.jam b/build.jam new file mode 100644 index 0000000..9cc71d1 --- /dev/null +++ b/build.jam @@ -0,0 +1,26 @@ +# 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/config//boost_config + /boost/throw_exception//boost_throw_exception + /boost/type_index//boost_type_index ; + +project /boost/any + : common-requirements + include + ; + +explicit + [ alias boost_any : : : : $(boost_dependencies) ] + [ alias all : boost_any test ] + ; + +call-if : boost-library any + ; + diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2 index 9c86a63..21dfee2 100644 --- a/doc/Jamfile.v2 +++ b/doc/Jamfile.v2 @@ -35,8 +35,8 @@ local doxygen_params = doxygen autodoc_any : - [ glob ../../../boost/any.hpp ] - [ glob ../../../boost/any/*.hpp ] + [ glob ../include/boost/any.hpp ] + [ glob ../include/boost/any/*.hpp ] : $(doxygen_params) "boost.doxygen.reftitle=Reference Section of Boost.Any" diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 527b75d..26f495d 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -6,22 +6,25 @@ # For more information, see http://www.boost.org/libs/any # -build-project unique_any ; +require-b2 5.0.1 ; +import-search /boost/config/checks ; +import config : requires ; -import ../../config/checks/config : requires ; +build-project unique_any ; import testing ; project : source-location . : requirements + /boost/any//boost_any [ requires cxx11_rvalue_references cxx11_static_assert ] ; test-suite any : [ run any_test.cpp ] [ run any_test.cpp : : : off BOOST_NO_RTTI BOOST_NO_TYPEID : any_test_no_rtti ] - [ run any_test_rv.cpp ] + [ run any_test_rv.cpp : : : ] [ run any_test_rv.cpp : : : off BOOST_NO_RTTI BOOST_NO_TYPEID : any_test_rv_no_rtti ] [ run any_test_mplif.cpp ] [ compile-fail any_cast_cv_failed.cpp ] @@ -29,7 +32,7 @@ test-suite any : [ compile-fail any_test_cv_to_rv_failed.cpp ] [ run basic_any_test.cpp ] [ run basic_any_test.cpp : : : off BOOST_NO_RTTI BOOST_NO_TYPEID : basic_any_test_no_rtti ] - [ run basic_any_test_rv.cpp ] + [ run basic_any_test_rv.cpp : : : ] [ run basic_any_test_rv.cpp : : : off BOOST_NO_RTTI BOOST_NO_TYPEID : basic_any_test_rv_no_rtti ] [ run basic_any_test_mplif.cpp ] [ run basic_any_test_large_object.cpp ] diff --git a/test/unique_any/Jamfile.v2 b/test/unique_any/Jamfile.v2 index a10c161..0d88275 100644 --- a/test/unique_any/Jamfile.v2 +++ b/test/unique_any/Jamfile.v2 @@ -8,7 +8,9 @@ # # For more information, see http://www.boost.org/libs/any -import ../../config/checks/config : requires ; +require-b2 5.0.1 ; +import-search /boost/config/checks ; +import config : requires ; import testing ;