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. #632

Draft
wants to merge 18 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions build.jam
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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/integer//boost_integer
/boost/lexical_cast//boost_lexical_cast
/boost/math//boost_math
/boost/predef//boost_predef
/boost/random//boost_random
/boost/throw_exception//boost_throw_exception ;

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

explicit
[ alias boost_multiprecision : : : : <library>$(boost_dependencies) ]
[ alias all : boost_multiprecision test example performance ]
;

call-if : boost-library multiprecision
;

use-project /boost/multiprecision/config : config ;

19 changes: 10 additions & 9 deletions config/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt.

import-search /boost/config/checks ;

import modules ;
import path ;
import ../../config/checks/config : requires ;
import config : requires ;

local gmp_path = [ modules.peek : GMP_PATH ] ;
local mpfr_path = [ modules.peek : MPFR_PATH ] ;
Expand All @@ -20,7 +22,6 @@ project : requirements
<include>$(mpfi_path)
<include>$(mpfi_path)/src
<include>$(tommath_path)
<include>../../..
<search>$(gmp_path)
<search>$(mpfr_path)
<search>$(mpfr_path)/build.vc10/lib/Win32/Debug
Expand All @@ -37,13 +38,13 @@ project : requirements
<toolset>gcc:<cxxflags>-Wextra
;

lib gmp ;
lib mpfr ;
lib mpfi ;
lib mpc ;
lib quadmath ;
lib tommath ;
lib f2c ;
searched-lib gmp : : <link>shared ;
searched-lib mpfr : : <link>shared ;
searched-lib mpfi : : <link>shared ;
searched-lib mpc : : <link>shared ;
searched-lib quadmath : : <link>shared ;
searched-lib tommath : : <link>shared ;
searched-lib f2c : : <link>shared ;

actions mp_simple_run_action
{
Expand Down
16 changes: 8 additions & 8 deletions doc/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ boostbook standalone
:
# Path for links to Boost:
<xsl:param>boost.root=../../../..

# Some general style settings:
<xsl:param>table.footnote.number.format=1
<xsl:param>footnote.number.format=1
Expand All @@ -42,8 +42,8 @@ boostbook standalone
# extending 'standard' BOOST_ROOT/doc/src/boostbook.css with
# @import url('../../../../doc/src/boostbook.css');
# in location multiprecision/doc/html/multiprecision.css


# PDF Options:
# TOC Generation: this is needed for FOP-0.9 and later:
<xsl:param>fop1.extensions=0
Expand All @@ -65,7 +65,7 @@ boostbook standalone
# default PNG graphics are awful in PDF form,
# better use SVGs instead:
<format>pdf:<xsl:param>admon.graphics.extension=".svg"
<format>pdf:<xsl:param>use.role.for.mediaobject=1
<format>pdf:<xsl:param>use.role.for.mediaobject=1
<format>pdf:<xsl:param>preferred.mediaobject.role=print
<format>pdf:<xsl:param>img.src.path=$(images_location)/
<format>pdf:<xsl:param>draft.mode="no"
Expand All @@ -76,19 +76,19 @@ boostbook standalone
# .SVG files are roughly twice the .png size and so a bit gross.
# This also changes the admonitions icons.
# <format>html:<xsl:param>admon.graphics.extension=".svg"
<format>html:<xsl:param>use.role.for.mediaobject=1
<format>html:<xsl:param>use.role.for.mediaobject=1
<format>html:<xsl:param>preferred.mediaobject.role=print
# <format>html:<xsl:param>img.src.path=$(images_location)/ isn't right for html.
<format>html:<xsl:param>draft.mode="no"
<format>html:<xsl:param>boost.url.prefix=http\://www.boost.org/doc/libs/release/libs/multiprecision/doc/html

# Index generation:
<auto-index>on
<auto-index-script>$(here)/index.idx
<auto-index-prefix>$(here)/../../..
<auto-index-prefix>$(here)/../include
<auto-index-verbose>on
<format>html:<auto-index-internal>on
<quickbook-define>enable_index
<quickbook-define>enable_index
<format>pdf:<xsl:param>index.on.type=1
;

Expand Down
25 changes: 13 additions & 12 deletions example/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
import testing ;
import modules ;
import path ;
import ../../config/checks/config : requires ;
import-search /boost/config/checks ;
import config : requires ;

local ntl-path = [ modules.peek : NTL_PATH ] ;
local gmp_path = [ modules.peek : GMP_PATH ] ;
Expand All @@ -21,16 +22,16 @@ local tommath_path = [ modules.peek : TOMMATH_PATH ] ;

project
: requirements
<library>/boost/multiprecision//boost_multiprecision

<include>$(gmp_path)
<include>$(gmp_path)/mpfr
<include>$(gmp_path)/gmpfrxx
<include>$(mpfr_path)
<include>$(mpfi_path)
<include>$(mpfi_path)/src
<include>$(tommath_path)
<include>../include
<include>../../..


<toolset>gcc:<cxxflags>-Wno-missing-braces
<toolset>darwin:<cxxflags>-Wno-missing-braces
<toolset>acc:<cxxflags>+W2068,2461,2236,4070
Expand All @@ -51,17 +52,17 @@ project
<toolset>msvc:<cxxflags>/wd4701
<toolset>msvc:<cxxflags>/wd4305
<toolset>clang:<link>static
[ requires
[ requires
cxx11_rvalue_references cxx11_template_aliases cxx11_hdr_array cxx11_allocator cxx11_constexpr cxx11_explicit_conversion_operators cxx11_ref_qualifiers
cxx11_hdr_functional cxx11_variadic_templates cxx11_user_defined_literals cxx11_decltype cxx11_static_assert cxx11_defaulted_functions
cxx11_noexcept cxx11_ref_qualifiers cxx11_user_defined_literals cxx11_hdr_type_traits
]
;

lib gmp : : <search>$(gmp_path) ;
lib mpfr : : <search>$(gmp_path) <search>$(mpfr_path) <search>$(mpfr_path)/build.vc10/lib/Win32/Debug ;
lib mpfi : : <search>$(gmp_path) <search>$(mpfr_path) <search>$(mpfr_path)/build.vc10/lib/Win32/Debug <search>$(mpfi_path) <search>$(mpfi_path)/src ;
lib quadmath ;
searched-lib gmp : : <search>$(gmp_path) ;
searched-lib mpfr : : <search>$(gmp_path) <search>$(mpfr_path) <search>$(mpfr_path)/build.vc10/lib/Win32/Debug ;
searched-lib mpfi : : <search>$(gmp_path) <search>$(mpfr_path) <search>$(mpfr_path)/build.vc10/lib/Win32/Debug <search>$(mpfi_path) <search>$(mpfi_path)/src ;
searched-lib quadmath ;

if $(tommath_path)
{
Expand All @@ -70,7 +71,7 @@ if $(tommath_path)
}
else
{
lib tommath : : <search>$(tommath_path) ;
searched-lib tommath : : <search>$(tommath_path) ;
TOMMATH = tommath ;
}

Expand All @@ -95,7 +96,7 @@ test-suite examples :
[ run integer_examples.cpp no_eh_eg_support ]
[ run logged_adaptor.cpp no_eh_eg_support mpfi mpfr gmp : : : [ check-target-builds ../config//has_mpfi : : <build>no ] ]
[ run mixed_integer_arithmetic.cpp no_eh_eg_support ]
[ run numeric_limits_snips.cpp no_eh_eg_support /boost//test_exec_monitor : : : [ requires cxx11_numeric_limits ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
[ run numeric_limits_snips.cpp no_eh_eg_support /boost/test//boost_test_exec_monitor : : : [ requires cxx11_numeric_limits ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
[ run random_snips.cpp gmp no_eh_eg_support : : : [ requires cxx11_explicit_conversion_operators ] [ check-target-builds ../config//has_gmp : : <build>no ] ]
[ run safe_prime.cpp no_eh_eg_support ]

Expand All @@ -104,7 +105,7 @@ test-suite examples :
[ run mpfr_snips.cpp mpfr gmp no_eh_eg_support : : : [ check-target-builds ../config//has_mpfr : : <build>no ] ]
[ run tommath_snips.cpp $(TOMMATH) no_eh_eg_support : : : [ check-target-builds ../config//has_tommath : : <build>no ] ]
[ compile constexpr_float_arithmetic_examples.cpp : [ requires cxx14_constexpr cxx17_if_constexpr ] ]

[ run big_seventh.cpp no_eh_eg_support ]

[ run exercise_threading_log_agm.cpp : : : <define>BOOST_MULTIPRECISION_EXERCISE_THREADING_BACKEND_TYPE=101 release [ requires cxx11_hdr_atomic cxx11_hdr_thread ] : exercise_threading_log_agm_cpp_dec_float ]
Expand Down
Loading
Loading