Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / math / example / Jamfile.v2
1 # \libs\math\example\jamfile.v2
2 # Runs statistics and floating-point examples.
3 # Copyright 2007 John Maddock
4 # Copyright Paul A. Bristow 2007, 2010, 2011.
5 # Distributed under the Boost Software License, Version 1.0.
6 # (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7
8 # bring in the rules for testing
9 import testing ;
10 import ../../config/checks/config : requires ;
11
12 project
13     : requirements
14       <toolset>gcc:<cxxflags>-Wno-missing-braces
15       <toolset>darwin:<cxxflags>-Wno-missing-braces
16       <toolset>acc:<cxxflags>+W2068,2461,2236,4070
17       <toolset>intel:<cxxflags>-Qwd264,239
18       <toolset>msvc:<warnings>all
19       <toolset>msvc:<asynch-exceptions>on
20     <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
21     <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
22     <toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
23     <toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS
24       <toolset>msvc:<cxxflags>/wd4996
25       <toolset>msvc:<cxxflags>/wd4512
26       <toolset>msvc:<cxxflags>/wd4610
27       <toolset>msvc:<cxxflags>/wd4510
28       <toolset>msvc:<cxxflags>/wd4127
29       <toolset>msvc:<cxxflags>/wd4701
30       <toolset>msvc:<cxxflags>/wd4127
31       <toolset>msvc:<cxxflags>/wd4305
32       <toolset>msvc:<cxxflags>/wd4459
33       <toolset>msvc:<cxxflags>/wd4456 # declaration of hides previous local declaration.
34       #-<toolset>msvc:<cxxflags>/Za # nonfinite Serialization examples fail link if disable MS extensions,
35       #  because serialization library is built with MS extensions enabled (default).
36       <toolset>clang:<cxxflags>-Wno-unknown-pragmas
37       <toolset>clang:<cxxflags>-Wno-language-extension-token
38
39       <include>../../..
40       <include>../include_private
41       <exception-handling>off:<source>../test//no_eh
42     ;
43
44 test-suite examples :
45    [ run bessel_zeros_example_1.cpp : : : <exception-handling>off:<build>no  ]
46    [ run bessel_zeros_interator_example.cpp : : : <exception-handling>off:<build>no  ]
47    [ run neumann_zeros_example_1.cpp : : : <exception-handling>off:<build>no  ]
48
49    [ run test_cpp_float_close_fraction.cpp ../../test/build//boost_unit_test_framework/<link>static : : : <exception-handling>off:<build>no  ]
50    [ run binomial_coinflip_example.cpp : : : <exception-handling>off:<build>no  ]
51    [ run binomial_confidence_limits.cpp  ]
52    [ run binomial_example_nag.cpp  ]
53    [ run binomial_quiz_example.cpp : : : <exception-handling>off:<build>no  ]
54    [ run binomial_sample_sizes.cpp  ]
55    [ run brent_minimise_example.cpp  : : : [ requires cxx11_hdr_tuple ] ]
56
57    [ run c_error_policy_example.cpp  ]
58    [ run chi_square_std_dev_test.cpp : : : <exception-handling>off:<build>no  ]
59    [ run distribution_construction.cpp : : : <exception-handling>off:<build>no  ]
60    [ run error_handling_example.cpp : : : <exception-handling>off:<build>no  ]
61    [ run error_policies_example.cpp  ]
62    [ run error_policy_example.cpp : : : <exception-handling>off:<build>no  ]
63    [ run f_test.cpp  ]
64    # [ run fft_sines_table.cpp  : : : [ requires cxx11_numeric_limits ] ]
65    # No need to re-run this routinely as it only creates a table of sines for a documentation example.
66
67    [ run find_location_example.cpp : : : <exception-handling>off:<build>no  ]
68    [ run find_mean_and_sd_normal.cpp : : : <exception-handling>off:<build>no  ]
69    [ run find_root_example.cpp : : : <exception-handling>off:<build>no  ]
70    [ run find_scale_example.cpp : : : <exception-handling>off:<build>no  ]
71    [ run geometric_examples.cpp : : : <exception-handling>off:<build>no  ]
72    [ run hyperexponential_snips.cpp  ]
73    [ run hyperexponential_more_snips.cpp  ]
74    [ run inverse_chi_squared_example.cpp  ]
75    [ run legendre_stieltjes_example.cpp : : : [ requires cxx11_auto_declarations cxx11_defaulted_functions cxx11_lambdas ]  ]
76    #[ # run inverse_chi_squared_find_df_example.cpp  ]
77    #[ run lambert_w_basic_example.cpp ]
78    [ run lambert_w_basic_example.cpp  : : : [ requires cxx11_numeric_limits ] ]
79    [ run lambert_w_simple_examples.cpp  : : : [ requires cxx11_numeric_limits ] ]
80    [ run lambert_w_precision_example.cpp  : : : [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : <linkflags>-lquadmath ] [ requires cxx11_numeric_limits cxx11_explicit_conversion_operators ] ]
81
82    [ run inverse_gamma_example.cpp  ]
83    [ run inverse_gamma_distribution_example.cpp : : : <exception-handling>off:<build>no  ]
84    [ run laplace_example.cpp : : : <exception-handling>off:<build>no  ]
85    [ run nc_chi_sq_example.cpp  ]
86    [ run neg_binom_confidence_limits.cpp  ]
87    [ run neg_binomial_sample_sizes.cpp  ]
88    [ run negative_binomial_example1.cpp : : : <exception-handling>off:<build>no  ]
89    [ run negative_binomial_example2.cpp  ]
90
91    [ run nonfinite_num_facet.cpp  ]
92    [ run nonfinite_facet_simple.cpp  ]
93    [ run nonfinite_num_facet_serialization.cpp ../../serialization/build//boost_serialization : : : <exception-handling>off:<build>no <toolset>gcc-mingw:<link>static  ]
94    #[ # run lexical_cast_native.cpp  ] # Expected to fail on some (but not all) platforms.
95    [ run lexical_cast_nonfinite_facets.cpp  ]
96    [ run nonfinite_loopback_ok.cpp  ]
97    [ run nonfinite_serialization_archives.cpp ../../serialization/build//boost_serialization  : : : <exception-handling>off:<build>no <toolset>gcc-mingw:<link>static  ]
98    [ run nonfinite_facet_sstream.cpp  ]
99
100    [ run constants_eg1.cpp  ]
101
102    [ run normal_misc_examples.cpp : : : <exception-handling>off:<build>no  ]
103    [ run owens_t_example.cpp  ]
104    [ run policy_eg_1.cpp  ]
105    [ run policy_eg_10.cpp : : : <target-os>vxworks:<build>no ] # VxWorks' complex.h has conflicting declaration of real
106    [ run policy_eg_2.cpp  ]
107    [ run policy_eg_3.cpp  ]
108    [ run policy_eg_4.cpp  ]
109    [ run policy_eg_5.cpp  ]
110    [ run policy_eg_6.cpp  ]
111    [ run policy_eg_7.cpp  ]
112    [ run policy_eg_8.cpp  ]
113    [ run policy_eg_9.cpp  ]
114    [ run policy_ref_snip1.cpp : : : <exception-handling>off:<build>no  ]
115    [ run policy_ref_snip10.cpp  ]
116    [ run policy_ref_snip11.cpp  ]
117    [ run policy_ref_snip12.cpp  ]
118    [ run policy_ref_snip13.cpp : : : <exception-handling>off:<build>no  ]  # Fails clang-win - thrown exception from no Cauchy mean.
119    [ run policy_ref_snip2.cpp  ]
120    [ run policy_ref_snip3.cpp : : : <exception-handling>off:<build>no  ]
121    [ run policy_ref_snip4.cpp  ]
122    [ run policy_ref_snip5.cpp  : : : <target-os>vxworks:<build>no ]
123    [ run policy_ref_snip6.cpp  ]
124    [ run policy_ref_snip7.cpp  ]
125    [ run policy_ref_snip8.cpp  ]
126    [ run policy_ref_snip9.cpp  ]
127    [ run skew_normal_example.cpp  ]
128    [ run students_t_example1.cpp  ]
129    [ run students_t_example2.cpp  ]
130    [ run students_t_example3.cpp  ]
131    [ run students_t_single_sample.cpp  ]
132    [ run students_t_two_samples.cpp  ]
133    [ run HSO3SO4.cpp  ]
134    [ run series.cpp  ]
135    [ run continued_fractions.cpp  ]
136
137    [ run barycentric_interpolation_example.cpp : : : [ requires cxx11_smart_ptr cxx11_function_template_default_args cxx11_unified_initialization_syntax cxx11_defaulted_functions cxx11_allocator cxx11_auto_declarations cxx11_lambdas ]  ]
138    [ run barycentric_interpolation_example_2.cpp : : : [ requires cxx11_smart_ptr cxx11_function_template_default_args cxx11_unified_initialization_syntax cxx11_defaulted_functions cxx11_allocator cxx11_auto_declarations cxx11_lambdas ]  ]
139    [ run cardinal_cubic_b_spline_example.cpp : : : [ requires cxx11_smart_ptr cxx11_hdr_random cxx11_defaulted_functions ]  ]
140    [ compile naive_monte_carlo_example.cpp : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_hdr_thread cxx11_hdr_atomic cxx11_decltype cxx11_hdr_future cxx11_hdr_chrono cxx11_hdr_random cxx11_allocator ] ]  # requires user input, can't run it, take a long time too!
141    [ run catmull_rom_example.cpp : : : [ requires cxx17_if_constexpr cxx11_auto_declarations cxx17_std_apply ] ] # Actually the C++17 features used is std::size, not if constexpr; looks like there isn't yet a test for it.
142    [ run autodiff_black_scholes_brief.cpp : : : [ requires cxx11_inline_namespaces ] ]
143    [ run autodiff_black_scholes.cpp : : : [ requires cxx11_inline_namespaces ] ]
144    [ run autodiff_fourth_power.cpp : : : [ requires cxx11_inline_namespaces ] ]
145    [ run autodiff_mixed_partials.cpp : : : [ requires cxx11_inline_namespaces ] ]
146    [ run autodiff_multiprecision.cpp : : : [ requires cxx11_inline_namespaces ] ]
147    [ run ooura_fourier_integrals_example.cpp : : : [ requires cxx11_hdr_mutex cxx11_lambdas cxx11_inline_namespaces cxx11_auto_declarations ] ]
148    [ run ooura_fourier_integrals_cosine_example.cpp : : : [ requires cxx11_hdr_mutex cxx11_inline_namespaces cxx11_auto_declarations cxx17_std_apply ] ]
149    [ run ooura_fourier_integrals_multiprecision_example.cpp : : : [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : <linkflags>-lquadmath ] [ requires cxx11_hdr_mutex cxx11_inline_namespaces cxx11_auto_declarations cxx17_std_apply ] ]
150
151 ;
152
153 run root_elliptic_finding.cpp /boost/timer : : : release <link>static  [ requires cxx11_unified_initialization_syntax cxx11_defaulted_functions ] <target-os>freebsd:<linkflags>"-lrt" <target-os>linux:<linkflags>"-lrt -lpthread" ;
154 run root_finding_algorithms.cpp /boost/timer : : : release <link>static  [ requires cxx11_hdr_tuple cxx11_unified_initialization_syntax ] <target-os>freebsd:<linkflags>"-lrt" <target-os>linux:<linkflags>"-lrt -lpthread" ;
155 run root_n_finding_algorithms.cpp /boost/timer : : : release <link>static  [ requires cxx11_unified_initialization_syntax cxx11_defaulted_functions ] <target-os>freebsd:<linkflags>"-lrt" <target-os>linux:<linkflags>"-lrt -lpthread" ;
156
157 explicit root_elliptic_finding  ;
158 explicit root_finding_algorithms  ;
159 explicit root_n_finding_algorithms  ;