Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for modular build structure. #34

Merged
merged 9 commits into from
Aug 18, 2024
28 changes: 28 additions & 0 deletions build.jam
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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/config//boost_config
/boost/core//boost_core
/boost/static_assert//boost_static_assert
/boost/throw_exception//boost_throw_exception
/boost/type_traits//boost_type_traits ;

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

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

call-if : boost-library integer
;

25 changes: 14 additions & 11 deletions test/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,32 @@
#~ Distributed under the Boost Software License, Version 1.0.
#~ (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)

require-b2 5.0.1 ;
import-search /boost/config/checks ;
import config : requires ;
import testing ;
import ../../config/checks/config : requires ;

project : requirements <warnings>all <toolset>gcc:<cxxflags>-Wextra ;
project : requirements <warnings>all <toolset>gcc:<cxxflags>-Wextra
<library>/boost/integer//boost_integer ;

obj has_gmpxx : has_gmpxx.cpp ;
explicit has_gmpxx ;

test-suite integer
:
[ run integer_traits_test.cpp ]
[ run integer_test.cpp : : : <toolset>gcc:<cxxflags>-Wno-long-long <toolset>darwin:<cxxflags>-Wno-long-long <toolset>sun:<cxxflags>"-Qoption ccfe -tmpldepth=128" ]
[ run integer_mask_test.cpp ]
[ run integer_log2_test.cpp ]
[ run static_log2_test.cpp ]
[ run static_min_max_test.cpp ]
[ run extended_euclidean_test.cpp ]
[ run mod_inverse_test.cpp ]
[ run integer_test.cpp : : : <library>/boost/mpl//boost_mpl <toolset>gcc:<cxxflags>-Wno-long-long <toolset>darwin:<cxxflags>-Wno-long-long <toolset>sun:<cxxflags>"-Qoption ccfe -tmpldepth=128" ]
[ run integer_mask_test.cpp : : : <library>/boost/detail//boost_detail ]
[ run integer_log2_test.cpp : : : <library>/boost/multiprecision//boost_multiprecision ]
[ run static_log2_test.cpp : : : <library>/boost/detail//boost_detail ]
[ run static_min_max_test.cpp : : : <library>/boost/detail//boost_detail ]
[ run extended_euclidean_test.cpp : : : <library>/boost/multiprecision//boost_multiprecision ]
[ run mod_inverse_test.cpp : : : <library>/boost/optional//boost_optional <library>/boost/multiprecision//boost_multiprecision ]
[ compile integer_traits_include_test.cpp ]
[ compile integer_include_test.cpp ]
[ compile integer_mask_include_test.cpp ]
[ compile static_log2_include_test.cpp ]
[ compile static_min_max_include_test.cpp ]
[ compile static_min_max_include_test.cpp : <library>/boost/detail//boost_detail ]
[ compile integer_fwd_include_test.cpp ]
[ compile gcd_constexpr14_test.cpp ]
[ compile gcd_noexcept_test.cpp ]
Expand All @@ -35,5 +38,5 @@ test-suite integer
[ compile-fail fail_uint_fast.cpp ]
[ compile-fail fail_uint_least.cpp ]
[ compile-fail fail_uint_65.cpp ]
[ run common_factor_test.cpp : : : [ check-target-builds has_gmpxx "Checking for gmpxx.h" : <define>BOOST_INTEGER_HAS_GMPXX_H=1 <linkflags>-lgmp <linkflags>-lgmpxx ] ]
[ run common_factor_test.cpp : : : <library>/boost/mpl//boost_mpl <library>/boost/random//boost_random <library>/boost/rational//boost_rational <library>/boost/multiprecision//boost_multiprecision [ check-target-builds has_gmpxx "Checking for gmpxx.h" : <define>BOOST_INTEGER_HAS_GMPXX_H=1 <linkflags>-lgmp <linkflags>-lgmpxx ] ]
;