From bf4a5afb3cd406ee7eb5180e0b39d9eec1605919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Ferdinand=20Rivera=20Morell?= Date: Sat, 30 Nov 2024 16:11:24 -0600 Subject: [PATCH] Add support for modular build structure. (#79) * Make the library modular usable. * Switch to library requirements instead of source. As source puts extra source in install targets. * Add requires-b2 check to top-level build file. * Bump B2 require to 5.2 * Change all references to . * Update copyright dates. * Move inter-lib dependencies to a project variable and into the build targets. * Update build deps. --- Jamfile | 11 ----------- build.jam | 29 +++++++++++++++++++++++++++++ example/Jamfile.v2 | 4 +++- test/Jamfile.v2 | 4 +++- 4 files changed, 35 insertions(+), 13 deletions(-) delete mode 100644 Jamfile create mode 100644 build.jam diff --git a/Jamfile b/Jamfile deleted file mode 100644 index ba92b48..0000000 --- a/Jamfile +++ /dev/null @@ -1,11 +0,0 @@ -# Boost.MPL Library Jamfile -# -# Copyright (c) 2018 James E. King III -# -# Use, modification, and distribution are subject to 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) - -# please order by name to ease maintenance -build-project example ; -build-project test ; diff --git a/build.jam b/build.jam new file mode 100644 index 0000000..f0a2e1f --- /dev/null +++ b/build.jam @@ -0,0 +1,29 @@ +# 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/predef//boost_predef + /boost/preprocessor//boost_preprocessor + /boost/static_assert//boost_static_assert + /boost/type_traits//boost_type_traits + /boost/utility//boost_utility ; + +project /boost/mpl + : common-requirements + include + ; + +explicit + [ alias boost_mpl : : : : $(boost_dependencies) ] + [ alias all : boost_mpl example test ] + ; + +call-if : boost-library mpl + ; + diff --git a/example/Jamfile.v2 b/example/Jamfile.v2 index ec2dc76..7c0203c 100644 --- a/example/Jamfile.v2 +++ b/example/Jamfile.v2 @@ -7,9 +7,11 @@ import testing ; +project : requirements /boost/mpl//boost_mpl ; + test-suite "mpl-examples" : [ run inherit_linearly.cpp ] [ compile integer.cpp ] - [ run tuple_from_list.cpp ] + [ run tuple_from_list.cpp : : : /boost/tuple//boost_tuple ] ; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 1fef348..66ed440 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -1,5 +1,6 @@ project : requirements + /boost/mpl//boost_mpl extra clang:-Wno-variadic-macros gcc:-Wshadow @@ -49,7 +50,8 @@ compile find.cpp ; compile find_if.cpp ; compile fold.cpp ; run for_each.cpp - : : : 98:no 03:no ; + : : : 98:no 03:no + /boost/bind//boost_bind ; compile front.cpp ; compile get_tag_def.cpp ; compile has_xxx.cpp ;