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

Merged
merged 47 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
f9070ef
Make the library modular usable.
grafikrobot Mar 11, 2024
b98469f
Fix -Wundef warnings
mborland Mar 11, 2024
8ffec61
Merge branch 'boostorg:develop' into modular
grafikrobot Mar 11, 2024
79c09ae
Switch to library requirements instead of source. As source puts extr…
grafikrobot Mar 30, 2024
71fe2b4
Sync from upstream.
grafikrobot Apr 10, 2024
9486409
Sync from upstream.
grafikrobot Apr 25, 2024
9170c3c
Add missing NO_LIB usage requirements.
grafikrobot Apr 29, 2024
edcca9f
Remove boost-root relative include path.
grafikrobot Apr 29, 2024
22ac271
Sync from upstream.
grafikrobot May 3, 2024
34ff5e0
Sync from upstream.
grafikrobot May 4, 2024
e98fc46
Add missing import-search for cconfig/predef checks.
grafikrobot May 5, 2024
2464686
Add requires-b2 check to top-level build file.
grafikrobot May 5, 2024
8e9e3c3
Sync from upstream.
grafikrobot May 17, 2024
8b26ee1
Sync from upstream.
grafikrobot May 20, 2024
0f291da
Sync from upstream.
grafikrobot May 30, 2024
1b67d84
Sync upstream.
grafikrobot May 30, 2024
9976b47
Sync from upstream.
grafikrobot Jun 2, 2024
b5dd7cb
Fix typo in test framework reference.
grafikrobot Jun 3, 2024
dddb31d
Bump B2 require to 5.2
grafikrobot Jun 14, 2024
56316ab
Sync from upstream.
grafikrobot Jun 16, 2024
df53dca
Sync from upstream.
grafikrobot Jul 12, 2024
3c85e37
Update copyright dates.
grafikrobot Jul 21, 2024
da0956a
Move inter-lib dependencies to a project variable and into the build …
grafikrobot Jul 24, 2024
ab0e10c
Sync from upstream.
grafikrobot Jul 25, 2024
333d993
Switch to /boost/test//included target for header only mode of Boost.…
grafikrobot Jul 26, 2024
dda954d
Sync from upstream.
grafikrobot Jul 27, 2024
59d4cd3
Adjust doc build to avoid boost-root references.
grafikrobot Jul 28, 2024
4cb0456
Sync from upstream.
grafikrobot Jul 30, 2024
16af053
Sync from upstream.
grafikrobot Aug 2, 2024
4ea6592
Update build deps.
grafikrobot Aug 3, 2024
cf09459
Sync from upstream.
grafikrobot Aug 3, 2024
7075448
Fix project props not applying to the no_eh.obj compile.
grafikrobot Aug 4, 2024
893e21a
Update build deps.
grafikrobot Aug 6, 2024
68279e5
Add missing import-search.
grafikrobot Aug 8, 2024
b63b02e
Sync from upstream.
grafikrobot Aug 9, 2024
2030316
Sync from upstream.
grafikrobot Aug 13, 2024
cc08d0c
Sync from upstream.
grafikrobot Aug 17, 2024
f42d096
Sync from upstream.
grafikrobot Aug 20, 2024
d2d49f5
Sync from upstream.
grafikrobot Aug 22, 2024
65e634b
Sync from upstream.
grafikrobot Aug 23, 2024
27d84fd
Fix float128_type checks to actually disable tests. Problem was that …
grafikrobot Aug 25, 2024
46a1ba7
GPU Batch 7
mborland Aug 27, 2024
9a30545
Fix policy macro definition for MSVC platforms
mborland Aug 27, 2024
de29b0f
Sync from upstream.
grafikrobot Aug 31, 2024
b86dc43
Don't add quadmath lib for has_128bit_floatmax_t check. It was accide…
grafikrobot Aug 31, 2024
52a639f
Fix incorrect name for float128 type check that caused it to not apear.
grafikrobot Aug 31, 2024
56e82c0
Sync from upstream.
grafikrobot Sep 4, 2024
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
48 changes: 48 additions & 0 deletions build.jam
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 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/integer//boost_integer
/boost/lexical_cast//boost_lexical_cast
/boost/predef//boost_predef
/boost/random//boost_random
/boost/static_assert//boost_static_assert
/boost/throw_exception//boost_throw_exception ;

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

explicit
[ alias boost_math : : : : <library>$(boost_dependencies) ]
[ alias boost_math_c99 : build//boost_math_c99 ]
[ alias boost_math_c99f : build//boost_math_c99f ]
[ alias boost_math_c99l : build//boost_math_c99l ]
[ alias boost_math_tr1 : build//boost_math_tr1 ]
[ alias boost_math_tr1f : build//boost_math_tr1f ]
[ alias boost_math_tr1l : build//boost_math_tr1l ]
[ alias all :
boost_math
boost_math_c99 boost_math_c99f boost_math_c99l
boost_math_tr1 boost_math_tr1f boost_math_tr1l
example test ]
[ alias testing : : : :
<include>test
<include>include_private ]
;

call-if : boost-library math
: install boost_math
boost_math_c99 boost_math_c99f boost_math_c99l
boost_math_tr1 boost_math_tr1f boost_math_tr1l
;

38 changes: 20 additions & 18 deletions build/Jamfile.v2
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# copyright John Maddock 2008
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# 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.

import testing ;
import pch ;
import ../../config/checks/config : requires ;
import-search /boost/config/checks ;
import config : requires ;

project
: requirements
<toolset>intel-win:<cxxflags>-nologo
<toolset>intel-win:<linkflags>-nologo
project
: common-requirements <library>$(boost_dependencies)
: requirements
<toolset>intel-win:<cxxflags>-nologo
<toolset>intel-win:<linkflags>-nologo
#<toolset>intel-linux:<pch>off
<toolset>intel-darwin:<pch>off
<toolset>gcc,<target-os>windows:<pch>off
Expand All @@ -20,9 +22,11 @@ project
[ check-target-builds ../config//has_gcc_visibility "gcc visibility" : <toolset>gcc:<cxxflags>-fvisibility=hidden : ]
[ requires cxx11_noexcept cxx11_rvalue_references sfinae_expr cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_hdr_initializer_list cxx11_hdr_chrono cxx11_thread_local cxx11_constexpr cxx11_nullptr cxx11_numeric_limits cxx11_decltype cxx11_hdr_array cxx11_hdr_atomic cxx11_hdr_type_traits cxx11_allocator cxx11_explicit_conversion_operators ]
[ requires cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx14_variable_templates cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction ]
: usage-requirements
<define>BOOST_MATH_TR1_NO_LIB=1
;

cpp-pch pch : ../src/tr1/pch.hpp : <include>../src/tr1 <link>shared:<define>BOOST_MATH_TR1_DYN_LINK=1 ;
cpp-pch pch : ../src/tr1/pch.hpp : <include>../src/tr1 <link>shared:<define>BOOST_MATH_TR1_DYN_LINK=1 ;

C99_SOURCES = acosh
asinh
Expand All @@ -46,7 +50,7 @@ round
tgamma
trunc ;

TR1_SOURCES =
TR1_SOURCES =
assoc_laguerre
assoc_legendre
beta
Expand Down Expand Up @@ -80,46 +84,44 @@ import targets ;

obj long_double_check : ../config/has_long_double_support.cpp ;
explicit long_double_check ;

# Library targets
lib boost_math_tr1 : ../src/tr1/$(TR1_SOURCES).cpp pch
:
:
<link>shared:<define>BOOST_MATH_TR1_DYN_LINK=1
<include>../src/tr1
;

lib boost_math_tr1f : ../src/tr1/$(TR1_SOURCES)f.cpp pch
:
:
<link>shared:<define>BOOST_MATH_TR1_DYN_LINK=1
<include>../src/tr1
;

lib boost_math_tr1l : ../src/tr1/$(TR1_SOURCES)l.cpp pch
:
:
<link>shared:<define>BOOST_MATH_TR1_DYN_LINK=1
<dependency>../config//has_long_double_support
<include>../src/tr1
[ check-target-builds ../config//has_long_double_support "long double support" : : <build>no ]
;

lib boost_math_c99 : ../src/tr1/$(C99_SOURCES).cpp pch
:
:
<link>shared:<define>BOOST_MATH_TR1_DYN_LINK=1
<include>../src/tr1
;

lib boost_math_c99f : ../src/tr1/$(C99_SOURCES)f.cpp pch
:
:
<link>shared:<define>BOOST_MATH_TR1_DYN_LINK=1
<include>../src/tr1
;

lib boost_math_c99l : ../src/tr1/$(C99_SOURCES)l.cpp pch
:
:
<link>shared:<define>BOOST_MATH_TR1_DYN_LINK=1
<dependency>../config//has_long_double_support
<include>../src/tr1
[ check-target-builds ../config//has_long_double_support "long double support" : : <build>no ]
;

boost-install boost_math_c99 boost_math_c99f boost_math_c99l boost_math_tr1 boost_math_tr1f boost_math_tr1l ;
10 changes: 5 additions & 5 deletions config/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import path ;
local ntl-path = [ modules.peek : NTL_PATH ] ;
local gmp_path = [ modules.peek : GMP_PATH ] ;

lib quadmath ;
lib fftw3 ;
lib fftw3f ;
lib fftw3l ;
lib fftw3q ;
searched-lib quadmath ;
searched-lib fftw3 ;
searched-lib fftw3f ;
searched-lib fftw3l ;
searched-lib fftw3q ;

obj has_long_double_support : has_long_double_support.cpp ;
obj has_mpfr_class : has_mpfr_class.cpp :
Expand Down
14 changes: 7 additions & 7 deletions doc/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ path-constant here : . ;
constant here-url : [ regex.replace $(here) "\\\\" "/" ] ;

xml math : math.qbk :
<quickbook-define>enable_index
<quickbook-define>enable_index
<quickbook-define>__base_path__=$(here-url)
<format>pdf:<quickbook-define>__build_pdf
<format>html:<quickbook-define>__build_html
Expand All @@ -25,7 +25,7 @@ boostbook standalone
# Path for links to Boost:
<xsl:param>boost.root=../../../..
<xsl:param>html.stylesheet=math.css

# Some general style settings:
<xsl:param>table.footnote.number.format=1
<xsl:param>footnote.number.format=1
Expand All @@ -46,11 +46,11 @@ boostbook standalone
# Index on type:
<xsl:param>index.on.type=1
<xsl:param>boost.noexpand.chapter.toc=1

#<xsl:param>root.filename="sf_dist_and_tools"
#<xsl:param>graphicsize.extension=1
#<xsl:param>use.extensions=1

# PDF Options:
# TOC Generation: this is needed for FOP-0.9 and later:
<xsl:param>fop1.extensions=0
Expand All @@ -74,23 +74,23 @@ boostbook standalone
# better use SVG's instead:
<format>pdf:<xsl:param>admon.graphics.extension=".svg"
<format>pdf:<xsl:param>admon.graphics.path=$(here)/../../../doc/src/images/
<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"
<format>pdf:<xsl:param>boost.url.prefix=http\://www.boost.org/doc/libs/release/libs/math/doc/html
<auto-index>on <format>pdf:<auto-index-internal>off
<format>html:<auto-index-internal>on
<auto-index-script>$(here)/index.idx
<auto-index-prefix>$(here)/../../..
<auto-index-prefix>$(here)/../include
#<auto-index-verbose>on
<format>pdf:<xsl:param>index.on.type=1
;

install pdfinstall : standalone/<format>pdf : <location>. <install-type>PDF <name>math.pdf ;
explicit pdfinstall ; # b2 pdf pdfinstall to do this pdf file copy.

install css_install : math.css : <location>$(here)/html ;
install css_install : math.css : <location>$(here)/html ;

###############################################################################
alias boostdoc ;
Expand Down
14 changes: 8 additions & 6 deletions example/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@

# bring in the rules for testing
import testing ;
import ../../config/checks/config : requires ;
import-search /boost/config/checks ;
import config : requires ;

project
: requirements
<library>/boost/math//boost_math
<library>/boost/multiprecision//boost_multiprecision
<toolset>gcc:<cxxflags>-Wno-missing-braces
<toolset>darwin:<cxxflags>-Wno-missing-braces
<toolset>acc:<cxxflags>+W2068,2461,2236,4070
Expand All @@ -36,7 +39,6 @@ project
<toolset>clang:<cxxflags>-Wno-unknown-pragmas
<toolset>clang:<cxxflags>-Wno-language-extension-token

<include>../../..
<include>../include_private
<exception-handling>off:<source>../test//no_eh
[ requires cxx11_noexcept cxx11_rvalue_references sfinae_expr cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_hdr_initializer_list cxx11_hdr_chrono cxx11_thread_local cxx11_constexpr cxx11_nullptr cxx11_numeric_limits cxx11_decltype cxx11_hdr_array cxx11_hdr_atomic cxx11_hdr_type_traits cxx11_allocator cxx11_explicit_conversion_operators ]
Expand All @@ -53,7 +55,7 @@ test-suite examples :
[ run binomial_example_nag.cpp ]
[ run binomial_quiz_example.cpp : : : <exception-handling>off:<build>no ]
[ run binomial_sample_sizes.cpp ]
[ run brent_minimise_example.cpp : : : [ requires cxx11_hdr_tuple ] ]
[ run brent_minimise_example.cpp /boost/test//included : : : [ requires cxx11_hdr_tuple ] ]

[ run c_error_policy_example.cpp ]
[ run chi_square_std_dev_test.cpp : : : <exception-handling>off:<build>no ]
Expand Down Expand Up @@ -93,11 +95,11 @@ test-suite examples :

[ run nonfinite_num_facet.cpp ]
[ run nonfinite_facet_simple.cpp ]
#[ run nonfinite_num_facet_serialization.cpp ../../serialization/build//boost_serialization : : : <exception-handling>off:<build>no <toolset>gcc-mingw:<link>static ]
#[ run nonfinite_num_facet_serialization.cpp /boost/serialization//boost_serialization : : : <exception-handling>off:<build>no <toolset>gcc-mingw:<link>static ]
#[ # run lexical_cast_native.cpp ] # Expected to fail on some (but not all) platforms.
[ run lexical_cast_nonfinite_facets.cpp ]
[ run nonfinite_loopback_ok.cpp ]
#[ run nonfinite_serialization_archives.cpp ../../serialization/build//boost_serialization : : : <exception-handling>off:<build>no <toolset>gcc-mingw:<link>static ]
#[ run nonfinite_serialization_archives.cpp /boost/serialization//boost_serialization : : : <exception-handling>off:<build>no <toolset>gcc-mingw:<link>static ]
[ run nonfinite_facet_sstream.cpp ]

[ run constants_eg1.cpp ]
Expand All @@ -113,7 +115,7 @@ test-suite examples :
[ run policy_eg_6.cpp ]
[ run policy_eg_7.cpp ]
[ run policy_eg_8.cpp ]
[ run policy_eg_9.cpp ]
[ run policy_eg_9.cpp /boost/format//boost_format ]
[ run policy_ref_snip1.cpp : : : <exception-handling>off:<build>no ]
[ run policy_ref_snip10.cpp ]
[ run policy_ref_snip11.cpp ]
Expand Down
Loading