]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | # Copyright Daryle Walker, Hubert Holin, John Maddock 2006 - 2007 |
2 | # copyright Paul A. Bristow 2006 - 2010 | |
3 | # Distributed under the Boost Software License, Version 1.0. | |
4 | # (See accompanying file LICENSE_1_0.txt or copy at | |
5 | # http://www.boost.org/LICENSE_1_0.txt. | |
6 | # \math_toolkit\libs\math\test\jamfile.v2 | |
7 | # Runs all math toolkit tests, functions & distributions, | |
8 | # and build math examples. | |
9 | ||
10 | # bring in the rules for testing | |
11 | import testing ; | |
12 | import modules ; | |
13 | import path ; | |
14 | import pch ; | |
15 | import ../../../config/checks/config : requires ; | |
16 | using quickbook ; | |
17 | using auto-index ; | |
18 | ||
19 | project | |
20 | : requirements | |
21 | <include>../../include_private | |
22 | ; | |
23 | ||
24 | if $(is_unix) | |
25 | { | |
26 | local osname = [ SHELL uname ] ; | |
27 | ||
28 | switch $(osname) | |
29 | { | |
30 | case "Sun*" : OTHERFLAGS = "-lpthread -lrt" ; | |
31 | case "*BSD*" : OTHERFLAGS = "-lpthread" ; | |
32 | } | |
33 | } | |
34 | ||
35 | # | |
36 | # Configuration first: | |
37 | # | |
38 | lib gsl ; | |
39 | lib gslcblas ; | |
40 | lib Rmath ; | |
92f5a8d4 TL |
41 | obj has_cxx17_cmath : has_cxx17_cmath.cpp ; |
42 | explicit has_cxx17_cmath ; | |
7c673cae FG |
43 | obj has_c99_cmath : has_c99_cmath.cpp ; |
44 | explicit has_c99_cmath ; | |
45 | exe has_gsl : has_gsl.cpp gsl gslcblas ; | |
46 | explicit has_gsl ; | |
47 | exe has_rmath : has_rmath.cpp Rmath ; | |
48 | explicit has_rmath ; | |
49 | ||
50 | CEPHES_SOURCE = acosh.c airy.c asin.c asinh.c atan.c atanh.c bdtr.c beta.c | |
51 | btdtr.c cbrt.c chbevl.c chdtr.c clog.c cmplx.c const.c | |
52 | cosh.c dawsn.c drand.c ei.c ellie.c ellik.c ellpe.c ellpj.c ellpk.c | |
53 | exp.c exp10.c exp2.c expn.c expx2.c fabs.c fac.c fdtr.c | |
54 | fresnl.c gamma.c gdtr.c hyp2f1.c hyperg.c i0.c i1.c igami.c incbet.c | |
55 | incbi.c igam.c isnan.c iv.c j0.c j1.c jn.c jv.c k0.c k1.c kn.c kolmogorov.c | |
56 | log.c log2.c log10.c lrand.c nbdtr.c ndtr.c ndtri.c pdtr.c planck.c | |
57 | polevl.c polmisc.c polylog.c polyn.c pow.c powi.c psi.c rgamma.c round.c | |
58 | shichi.c sici.c sin.c sindg.c sinh.c spence.c stdtr.c struve.c | |
59 | tan.c tandg.c tanh.c unity.c yn.c zeta.c zetac.c | |
60 | sqrt.c floor.c setprec.c mtherr.c ; | |
61 | ||
62 | path-constant here : . ; | |
63 | make $(here)/third_party/cephes_double/acosh.c : : @check_exists ; | |
64 | actions check_exists | |
65 | { | |
66 | stat $(<) | |
67 | } | |
68 | explicit $(here)/third_party/cephes_double/acosh.c ; | |
69 | ||
70 | lib cephes_double : $(here)/third_party/cephes_double/$(CEPHES_SOURCE) | |
71 | : | |
72 | release | |
73 | <link>static | |
74 | [ check-target-builds $(here)/third_party/cephes_double/acosh.c : : <build>no ] | |
75 | ; | |
76 | ||
77 | explicit cephes_double ; | |
78 | ||
79 | rule all-tests { | |
80 | local result ; | |
81 | for local source in [ glob test*.cpp ] | |
82 | { | |
83 | result += [ run $(source) /boost/regex//boost_regex /boost/system /boost/filesystem /boost/test//boost_unit_test_framework | |
84 | : : : | |
85 | [ check-target-builds has_gsl : <define>ALWAYS_TEST_DOUBLE : ] | |
86 | <target-os>linux:<linkflags>-lpthread | |
87 | <target-os>linux:<linkflags>-lrt | |
88 | <toolset>gcc:<linkflags>$(OTHERFLAGS) ] | |
89 | ; | |
90 | result += [ run $(source) /boost/regex//boost_regex /boost/system /boost/filesystem /boost/test//boost_unit_test_framework | |
92f5a8d4 | 91 | : : : [ check-target-builds has_cxx17_cmath : <define>TEST_CXX17_CMATH : <build>no ] |
7c673cae FG |
92 | <target-os>linux:<linkflags>-lpthread |
93 | <target-os>linux:<linkflags>-lrt | |
94 | <toolset>gcc:<linkflags>$(OTHERFLAGS) | |
92f5a8d4 | 95 | : $(source:B)_cxx17_cmath ] |
7c673cae FG |
96 | ; |
97 | result += [ run $(source) /boost/regex//boost_regex /boost/system /boost/filesystem /boost/test//boost_unit_test_framework | |
98 | : : : [ check-target-builds has_c99_cmath : <define>TEST_C99 : <build>no ] | |
99 | <target-os>linux:<linkflags>-lpthread | |
100 | <target-os>linux:<linkflags>-lrt | |
101 | <toolset>gcc:<linkflags>$(OTHERFLAGS) | |
102 | : $(source:B)_c99 ] | |
103 | ; | |
104 | result += [ run $(source) /boost/regex//boost_regex /boost/system /boost/filesystem /boost/test//boost_unit_test_framework gsl gslcblas | |
105 | : : : [ check-target-builds has_gsl : <define>TEST_GSL : <build>no ] | |
106 | <target-os>linux:<linkflags>-lpthread | |
107 | <target-os>linux:<linkflags>-lrt | |
108 | <toolset>gcc:<linkflags>$(OTHERFLAGS) | |
109 | : $(source:B)_gsl ] | |
110 | ; | |
111 | result += [ run $(source) /boost/regex//boost_regex /boost/system /boost/filesystem /boost/test//boost_unit_test_framework Rmath | |
112 | : : : [ check-target-builds has_rmath : <define>TEST_RMATH : <build>no ] | |
113 | <target-os>linux:<linkflags>-lpthread | |
114 | <target-os>linux:<linkflags>-lrt | |
115 | <toolset>gcc:<linkflags>$(OTHERFLAGS) | |
116 | : $(source:B)_rmath ] | |
117 | ; | |
118 | result += [ run $(source) /boost/regex//boost_regex /boost/system /boost/filesystem /boost/test//boost_unit_test_framework cephes_double | |
119 | : : : [ check-target-builds $(here)/third_party/cephes_double/acosh.c : <define>TEST_CEPHES <source>cephes_double : <build>no ] | |
120 | <target-os>linux:<linkflags>-lpthread | |
121 | <target-os>linux:<linkflags>-lrt | |
122 | <toolset>gcc:<linkflags>$(OTHERFLAGS) | |
123 | : $(source:B)_cephes ] | |
124 | ; | |
125 | } | |
126 | return $(result) ; | |
127 | } | |
128 | ||
129 | test-suite report_gen : [ all-tests ] ; | |
130 | ||
131 | path-constant images_location : html ; | |
132 | path-constant here : . ; | |
133 | ||
134 | xml report : doc/report.qbk : <dependency>report_gen ; | |
135 | boostbook standalone | |
136 | : | |
137 | report | |
138 | : | |
139 | # Path for links to Boost: | |
140 | <xsl:param>boost.root=../../../../.. | |
141 | ||
142 | # Some general style settings: | |
143 | <xsl:param>table.footnote.number.format=1 | |
144 | <xsl:param>footnote.number.format=1 | |
145 | <xsl:param>html.stylesheet=http://www.boost.org/doc/libs/1_58_0/doc/src/boostbook.css | |
146 | ||
147 | # HTML options first: | |
148 | # Use graphics not text for navigation: | |
149 | <xsl:param>navig.graphics=1 | |
150 | # How far down we chunk nested sections, basically all of them: | |
151 | <xsl:param>chunk.section.depth=0 | |
152 | # Don't put the first section on the same page as the TOC: | |
153 | <xsl:param>chunk.first.sections=0 | |
154 | # How far down sections get TOC's | |
155 | <xsl:param>toc.section.depth=2 | |
156 | # Max depth in each TOC: | |
157 | <xsl:param>toc.max.depth=4 | |
158 | # How far down we go with TOC's | |
159 | <xsl:param>generate.section.toc.level=10 | |
160 | ; | |
161 | ||
20effc67 TL |
162 | lib gmp ; |
163 | lib mpfr ; | |
164 | lib quadmath ; | |
165 | # | |
166 | # Some manual tests that are expensive to run: | |
167 | # | |
168 | run erf_error_plot.cpp mpfr gmp : : : release <cxxstd>17 [ check-target-builds ../../config//has_mpfr : : <build>no ] : erf_error_plot_double ; | |
169 | explicit erf_error_plot_double ; | |
170 | run erf_error_plot.cpp mpfr gmp : : : release <cxxstd>17 <define>TEST_TYPE="\"long double\"" [ check-target-builds ../../config//has_mpfr : : <build>no ] : erf_error_plot_long_double ; | |
171 | explicit erf_error_plot_long_double ; | |
172 | run erf_error_plot.cpp mpfr gmp : : : release <cxxstd>17 <define>TEST_TYPE=cpp_bin_float_50 [ check-target-builds ../../config//has_mpfr : : <build>no ] : erf_error_plot_cpp_bin_float_50 ; | |
173 | explicit erf_error_plot_cpp_bin_float_50 ; | |
174 | run erf_error_plot.cpp mpfr gmp quadmath : : : release <cxxstd>17 <cxxstd-dialect>gnu <define>TEST_TYPE=float128 [ check-target-builds ../../config//has_mpfr : : <build>no ] : erf_error_plot_float128 ; | |
175 | explicit erf_error_plot_cpp_bin_float_50 ; | |
176 | run erfc_error_plot.cpp mpfr gmp : : : release <cxxstd>17 [ check-target-builds ../../config//has_mpfr : : <build>no ] : erfc_error_plot_double ; | |
177 | explicit erfc_error_plot_double ; | |
178 | run erfc_error_plot.cpp mpfr gmp : : : release <cxxstd>17 <define>TEST_TYPE="\"long double\"" [ check-target-builds ../../config//has_mpfr : : <build>no ] : erfc_error_plot_long_double ; | |
179 | explicit erfc_error_plot_long_double ; | |
180 | run erfc_error_plot.cpp mpfr gmp : : : release <cxxstd>17 <define>TEST_TYPE=cpp_bin_float_50 [ check-target-builds ../../config//has_mpfr : : <build>no ] : erfc_error_plot_cpp_bin_float_50 ; | |
181 | explicit erfc_error_plot_cpp_bin_float_50 ; | |
182 | run erfc_error_plot.cpp mpfr gmp quadmath : : : release <cxxstd>17 <cxxstd-dialect>gnu <define>TEST_TYPE=float128 [ check-target-builds ../../config//has_mpfr : : <build>no ] : erfc_error_plot_float128 ; | |
183 | explicit erfc_error_plot_cpp_bin_float_50 ; |