Skip to content

Commit

Permalink
Add support for modular build structure. (boostorg#84)
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.

* Remove not-needed reference to Conversion dependency.

* Add missing b2 testing module import.

* 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.
  • Loading branch information
grafikrobot authored and Georgiy Guminov committed Oct 10, 2024
1 parent cdb9206 commit 585f959
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 7 deletions.
35 changes: 35 additions & 0 deletions build.jam
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# 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/concept_check//boost_concept_check
/boost/config//boost_config
/boost/core//boost_core
/boost/detail//boost_detail
/boost/function_types//boost_function_types
/boost/fusion//boost_fusion
/boost/mpl//boost_mpl
/boost/optional//boost_optional
/boost/smart_ptr//boost_smart_ptr
/boost/static_assert//boost_static_assert
/boost/type_traits//boost_type_traits
/boost/utility//boost_utility ;

project /boost/iterator
: common-requirements
<include>include
;

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

call-if : boost-library iterator
;

18 changes: 11 additions & 7 deletions test/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
# Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

import testing ;

project : requirements <library>/boost/iterator//boost_iterator ;

test-suite iterator
:
# These first two tests will run last, and are expected to fail
Expand All @@ -22,9 +26,9 @@ test-suite iterator
[ run zip_iterator_test2_fusion_vector.cpp ]
[ run zip_iterator_test2_fusion_list.cpp ]
# [ run zip_iterator_test2_fusion_deque.cpp ] // See bug report for fusion https://svn.boost.org/trac/boost/ticket/11572
[ run zip_iterator_test_fusion.cpp ]
[ run zip_iterator_test_std_tuple.cpp ]
[ run zip_iterator_test_std_pair.cpp ]
[ run zip_iterator_test_fusion.cpp : : : <library>/boost/assign//boost_assign ]
[ run zip_iterator_test_std_tuple.cpp : : : <library>/boost/assign//boost_assign ]
[ run zip_iterator_test_std_pair.cpp : : : <library>/boost/assign//boost_assign ]

[ run is_iterator.cpp ]

Expand Down Expand Up @@ -61,10 +65,10 @@ test-suite iterator
[ compile-fail minimum_category_compile_fail.cpp ]

[ run next_prior_test.cpp ]
[ run advance_test.cpp ]
[ run distance_test.cpp ]
[ compile adl_test.cpp ]
[ compile range_distance_compat_test.cpp ]
[ run advance_test.cpp : : : <library>/boost/container//boost_container ]
[ run distance_test.cpp : : : <library>/boost/container//boost_container ]
[ compile adl_test.cpp : <library>/boost/array//boost_array ]
[ compile range_distance_compat_test.cpp : <library>/boost/range//boost_range ]

[ run shared_iterator_test.cpp ]
;

0 comments on commit 585f959

Please sign in to comment.