Skip to content

Commit

Permalink
Add support for modular build structure. (#24)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
grafikrobot authored Aug 18, 2024
1 parent 8047679 commit a54b261
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 4 deletions.
27 changes: 27 additions & 0 deletions build.jam
Original file line number Diff line number Diff line change
@@ -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>include
;

explicit
[ alias boost_detail : : : : <library>$(boost_dependencies) ]
[ alias all : boost_detail test ]
;

call-if : boost-library detail
;

2 changes: 1 addition & 1 deletion doc/build.jam
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ boostbook standalone
<xsl:param>generate.section.toc.level=3
<xsl:param>chunk.section.depth=2
#<xsl:param>chunk.first.sections=1

<dependency>images
<dependency>callouts
<dependency>css
Expand Down
11 changes: 8 additions & 3 deletions test/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
<library>/boost/detail//boost_detail
<library>/boost/type_traits//boost_type_traits
<c++-template-depth>300
<toolset>clang:<cxxflags>-Wno-unused
<toolset>clang:<cxxflags>-Wno-tautological-compare
Expand All @@ -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 ;
Expand Down

0 comments on commit a54b261

Please sign in to comment.