Skip to content

Commit

Permalink
Add support for modular build structure. (#121)
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 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 22, 2024
1 parent 8913607 commit d5dc15a
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 22 deletions.
36 changes: 36 additions & 0 deletions build.jam
Original file line number Diff line number Diff line change
@@ -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>include
;

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

call-if : boost-library phoenix
;

46 changes: 24 additions & 22 deletions test/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
{
Expand All @@ -22,18 +23,19 @@ if [ os.environ CI ]

project
: requirements
<library>/boost/phoenix//boost_phoenix
<toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
<toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
<toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS
$(CI_DEFINES)
;

local multi-threading = <library>/boost/thread
local multi-threading = <library>/boost/thread//boost_thread
<threading>multi <define>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 ]
;
Expand Down Expand Up @@ -88,28 +90,28 @@ 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 ]
[ run statement/switch_tests.cpp ]
[ 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 ]
Expand Down Expand Up @@ -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 :
Expand Down Expand Up @@ -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 ]
Expand All @@ -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 ]
Expand Down

0 comments on commit d5dc15a

Please sign in to comment.