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 <source> references to <library>.

* 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-11-30 16:11:24 -06:00
committed by GitHub
parent b37b709cbd
commit bf4a5afb3c
4 changed files with 35 additions and 13 deletions

11
Jamfile
View File

@@ -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 ;

29
build.jam Normal file
View File

@@ -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>include
;
explicit
[ alias boost_mpl : : : : <library>$(boost_dependencies) ]
[ alias all : boost_mpl example test ]
;
call-if : boost-library mpl
;

View File

@@ -7,9 +7,11 @@
import testing ;
project : requirements <library>/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 : : : <library>/boost/tuple//boost_tuple ]
;

View File

@@ -1,5 +1,6 @@
project
: requirements
<library>/boost/mpl//boost_mpl
<warnings>extra
<toolset>clang:<cxxflags>-Wno-variadic-macros
<toolset>gcc:<cxxflags>-Wshadow
@@ -49,7 +50,8 @@ compile find.cpp ;
compile find_if.cpp ;
compile fold.cpp ;
run for_each.cpp
: : : <cxxstd>98:<build>no <cxxstd>03:<build>no ;
: : : <cxxstd>98:<build>no <cxxstd>03:<build>no
<library>/boost/bind//boost_bind ;
compile front.cpp ;
compile get_tag_def.cpp ;
compile has_xxx.cpp ;