Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / multiprecision / test / Jamfile.v2
1 # copyright John Maddock 2011
2 # Distributed under the Boost Software License, Version 1.0.
3 # (See accompanying file LICENSE_1_0.txt or copy at
4 # http://www.boost.org/LICENSE_1_0.txt.
5
6 import testing ;
7 import modules ;
8 import path ;
9 import ../../config/checks/config : requires ;
10
11 local ntl-path = [ modules.peek : NTL_PATH ] ;
12 local gmp_path = [ modules.peek : GMP_PATH ] ;
13 local mpfr_path = [ modules.peek : MPFR_PATH ] ;
14 local mpfi_path = [ modules.peek : MPFI_PATH ] ;
15 local tommath_path = [ modules.peek : TOMMATH_PATH ] ;
16
17
18 #######################################################################################
19 #
20 #  NOTE: Because these tests take a fair while to build and run, they are split up into
21 #        multiple smaller test suites which are:
22 #
23 #        arithmetic_tests
24 #        functions_and_limits
25 #        conversions
26 #        cpp_int_tests
27 #        misc
28 #        specfun
29 #        compile_fail
30 #        concepts
31 #        examples
32 #        
33 #        You can run an individual suite by passing it's name to b2 on the command line.
34 #        Or you can run all except the "specfun" tests (which are very slow) by not specifying anything.
35 #
36 #        Please make sure that any new tests are added to one of the test suites, and that the
37 #        build times for the various suites are reasonably balanced: otherwise the CI builds
38 #        will time out if one suite contains too many.
39 #
40 #######################################################################################################
41
42 path-constant here : . ;
43
44 project : requirements
45    <include>$(gmp_path)
46    <include>$(gmp_path)/mpfr
47    <include>$(gmp_path)/gmpfrxx
48    <include>$(mpfr_path)
49    <include>$(mpfi_path)
50    <include>$(mpfi_path)/src
51    <include>$(tommath_path)
52    <include>../include
53    <include>../../..
54    # We set these to make it easier to set up and test GMP and MPFR under Win32:
55    <toolset>msvc:<runtime-link>static
56    <toolset>msvc:<link>static
57    <toolset>msvc:<warnings>all
58    <toolset>msvc:<cxxflags>/fp\:precise
59    <toolset>intel-win:<runtime-link>static
60    <toolset>intel-win:<link>static
61    <toolset>clang-win:<link>static
62    
63    # Assembler error "File too big" caused by lots of C++ templates, for example, math/floating_point_examples.cpp.
64    # Some projects on some toolsets may require
65    #   <toolset>gcc-mingw:<cxxflags>\"-Wa,-mbig-obj\"
66    # See https://digitalkarabela.com/mingw-w64-how-to-fix-file-too-big-too-many-sections/
67    # <toolset>gcc-mingw:<cxxflags>-Wa,-mbig-obj # Some projects may overflow assembler and require equivalent of MSVC /bigobj.
68    # Requires version 2.30 of GNU binutils.
69    # Best applied only to projects that require this, see multiprecision/example  run math/floating_point_examples.cpp.
70    
71    # Speed up compiles:
72    <toolset>msvc:<debug-symbols>off
73    <toolset>intel:<debug-symbols>off
74    <toolset>gcc:<cxxflags>-Wall
75    <toolset>gcc:<cxxflags>-Wextra
76    <toolset>intel:<define>SLOW_COMPILER
77    <toolset>msvc,<optimization>off:<cxxflags>-RTC1
78    # We can't yet enable this - it breaks the STL in some tests...
79    #<toolset>msvc,<optimization>off:<cxxflags>-RTCc
80    #<toolset>msvc,<optimization>off:<define>_ALLOW_RTCc_IN_STL
81    ;
82
83 local enable-specfun = [ MATCH (--enable-specfun) : [ modules.peek : ARGV ] ] ;
84 local disable-concepts = [ MATCH (--disable-concepts) : [ modules.peek : ARGV ] ] ;
85
86 lib gmp : : <search>$(gmp_path) ;
87 lib mpfr : : <search>$(gmp_path) <search>$(mpfr_path) <search>$(mpfr_path)/build.vc10/lib/Win32/Debug ;
88 lib mpfi : : <search>$(gmp_path) <search>$(mpfr_path) <search>$(mpfr_path)/build.vc10/lib/Win32/Debug <search>$(mpfi_path) <search>$(mpfi_path)/src ;
89 lib quadmath ;
90 lib mpc ;
91
92 if $(tommath_path)
93 {
94    lib tommath : [ GLOB $(tommath_path) : *.c ] ;
95    TOMMATH = tommath ;
96 }
97 else
98 {
99    lib tommath : : <search>$(tommath_path) ;
100    TOMMATH = tommath ;
101 }
102
103 lib no_eh_support : no_eh_test_support.cpp ;
104
105 test-suite arithmetic_tests :
106
107    [ run test_arithmetic_backend_concept.cpp no_eh_support ]
108
109    [ run test_arithmetic_cpp_dec_float_1.cpp no_eh_support ]
110    [ run test_arithmetic_cpp_dec_float_2.cpp no_eh_support ]
111    [ run test_arithmetic_cpp_dec_float_3.cpp no_eh_support ]
112    [ run test_arithmetic_cpp_dec_float_3m.cpp no_eh_support ]
113
114    [ run test_arithmetic_cpp_bin_float_1.cpp no_eh_support ]
115    [ run test_arithmetic_cpp_bin_float_2.cpp no_eh_support ]
116    [ run test_arithmetic_cpp_bin_float_2m.cpp no_eh_support ]
117    [ run test_arithmetic_cpp_bin_float_3.cpp no_eh_support ]
118
119    [ run test_arithmetic_mpf_50.cpp gmp no_eh_support : : : [ check-target-builds ../config//has_gmp : : <build>no ] ]
120    [ run test_arithmetic_mpf.cpp gmp no_eh_support : : : [ check-target-builds ../config//has_gmp : : <build>no ] ]
121    [ run test_arithmetic_mpz.cpp gmp no_eh_support : : : [ check-target-builds ../config//has_gmp : : <build>no ] ]
122    [ run test_arithmetic_mpz_rat.cpp gmp no_eh_support : : : [ check-target-builds ../config//has_gmp : : <build>no ] ]
123    [ run test_arithmetic_mpz_br.cpp gmp no_eh_support : : : [ check-target-builds ../config//has_gmp : : <build>no ] ]
124    [ run test_arithmetic_mpq.cpp gmp no_eh_support : : : [ check-target-builds ../config//has_gmp : : <build>no ] ]
125
126    [ run test_arithmetic_mpfr.cpp mpfr gmp no_eh_support : : : [ check-target-builds ../config//has_mpfr : : <build>no ] ]
127    [ run test_arithmetic_mpfr_50.cpp mpfr gmp no_eh_support : : : [ check-target-builds ../config//has_mpfr : : <build>no ] ]
128    [ run test_arithmetic_mpfr_50_static.cpp mpfr gmp no_eh_support : : : [ check-target-builds ../config//has_mpfr : : <build>no ] ]
129
130    [ run test_arithmetic_tommath.cpp $(TOMMATH) no_eh_support : : : [ check-target-builds ../config//has_tommath : : <build>no ] ]
131    [ run test_arithmetic_tommath_rat.cpp $(TOMMATH) no_eh_support : : : [ check-target-builds ../config//has_tommath : : <build>no ] ]
132    [ run test_arithmetic_tommath_br.cpp $(TOMMATH) no_eh_support : : : [ check-target-builds ../config//has_tommath : : <build>no ] ]
133
134    [ run test_arithmetic_cpp_int_1.cpp no_eh_support : : : <toolset>msvc:<cxxflags>-bigobj ]
135    [ run test_arithmetic_cpp_int_2.cpp no_eh_support ]
136    [ run test_arithmetic_cpp_int_3.cpp no_eh_support ]
137    [ run test_arithmetic_cpp_int_4.cpp no_eh_support ]
138    [ run test_arithmetic_cpp_int_5.cpp no_eh_support ]
139    [ run test_arithmetic_cpp_int_6.cpp no_eh_support ]
140    [ run test_arithmetic_cpp_int_7.cpp no_eh_support ]
141    [ run test_arithmetic_cpp_int_8.cpp no_eh_support ]
142    [ run test_arithmetic_cpp_int_9.cpp no_eh_support ]
143    [ run test_arithmetic_cpp_int_10.cpp no_eh_support ]
144    [ run test_arithmetic_cpp_int_11.cpp no_eh_support ]
145    [ run test_arithmetic_cpp_int_12.cpp no_eh_support ]
146    [ run test_arithmetic_cpp_int_13.cpp no_eh_support ]
147    [ run test_arithmetic_cpp_int_14.cpp no_eh_support ]
148    [ run test_arithmetic_cpp_int_15.cpp no_eh_support ]
149    [ run test_arithmetic_cpp_int_16.cpp no_eh_support ]
150    [ run test_arithmetic_cpp_int_17.cpp no_eh_support ]
151    [ run test_arithmetic_cpp_int_18.cpp no_eh_support ]
152    [ run test_arithmetic_cpp_int_19.cpp no_eh_support ]
153    [ run test_arithmetic_cpp_int_br.cpp no_eh_support ]
154
155    [ run test_arithmetic_ab_1.cpp no_eh_support ]
156    [ run test_arithmetic_ab_2.cpp no_eh_support ]
157    [ run test_arithmetic_ab_3.cpp no_eh_support ]
158
159    [ run test_cpp_dec_float_round.cpp no_eh_support ]
160
161    [ run test_arithmetic_logged_1.cpp no_eh_support ]
162    [ run test_arithmetic_logged_2.cpp no_eh_support ]
163
164    [ run test_arithmetic_dbg_adptr1.cpp no_eh_support ]
165    [ run test_arithmetic_dbg_adptr1m.cpp no_eh_support ]
166    [ run test_arithmetic_dbg_adptr2.cpp no_eh_support ]
167
168    [ run test_arithmetic_mpfi_50.cpp mpfi mpfr gmp no_eh_support : : : [ check-target-builds ../config//has_mpfi : : <build>no ] ]
169
170    [ run test_arithmetic_float_128.cpp quadmath no_eh_support : : : [ check-target-builds ../config//has_float128 : : <build>no ] ]
171    [ run test_arithmetic_float_128.cpp no_eh_support : : : [ check-target-builds ../config//has_intel_quad : <cxxflags>-Qoption,cpp,--extended_float_type : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] : test_arithmetic_intel_quad ]
172
173    [ run test_arithmetic_mpc.cpp mpc mpfr gmp : : : [ check-target-builds ../config//has_mpc : : <build>no ] ]
174    [ run test_mpfr_mpc_precisions.cpp mpc mpfr gmp : : : [ check-target-builds ../config//has_mpc : : <build>no ] ]
175    [ run test_mpfi_precisions.cpp mpfi mpfr gmp : : : [ check-target-builds ../config//has_mpfi : : <build>no ] ]
176    [ run test_mpf_precisions.cpp gmp : : : [ check-target-builds ../config//has_gmp : : <build>no ] ]
177    [ run test_complex.cpp : : : [ check-target-builds ../config//has_mpc : <define>TEST_MPC <source>mpc <source>mpfr <source>gmp ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
178    [ run test_arithmetic_complex_adaptor.cpp ]
179    [ run test_arithmetic_complex_adaptor_2.cpp ]
180    [ run test_arithmetic_complex128.cpp : : : [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
181
182 ;
183
184 rule get_function_tests
185 {
186    local result ;
187    for local source in test_exp.cpp test_log.cpp test_pow.cpp test_sinh.cpp test_sqrt.cpp test_cosh.cpp test_tanh.cpp test_sin.cpp test_cos.cpp test_tan.cpp test_asin.cpp test_acos.cpp test_atan.cpp test_round.cpp test_fpclassify.cpp test_sf_import_c99.cpp
188    {
189          result += [ run $(source) gmp no_eh_support
190               : # command line
191               : # input files
192               : # requirements
193                [ check-target-builds ../config//has_gmp : : <build>no ]
194                <define>TEST_MPF_50
195               : $(source:B)_mpf50 ] ;
196          result += [ run $(source) mpfr gmp no_eh_support
197               : # command line
198               : # input files
199               : # requirements
200                [ check-target-builds ../config//has_mpfr : : <build>no ]
201                <define>TEST_MPFR_50
202               : $(source:B)_mpfr50 ] ;
203          result += [ run $(source) mpfi mpfr gmp no_eh_support
204               : # command line
205               : # input files
206               : # requirements
207                [ check-target-builds ../config//has_mpfi : : <build>no ]
208                <define>TEST_MPFI_50
209               : $(source:B)_mpfi50 ] ;
210          result += [ run $(source) no_eh_support
211               : # command line
212               : # input files
213               : # requirements
214                <define>TEST_CPP_DEC_FLOAT
215               : $(source:B)_cpp_dec_float ] ;
216          result += [ run $(source) no_eh_support
217               : # command line
218               : # input files
219               : # requirements
220                <define>TEST_CPP_BIN_FLOAT
221               : $(source:B)_cpp_bin_float ] ;
222          result += [ run $(source) quadmath no_eh_support
223               : # command line
224               : # input files
225               : # requirements
226                [ check-target-builds ../config//has_float128 : : <build>no ]
227                <define>TEST_FLOAT128
228               : $(source:B)_float128 ] ;
229          result += [ run $(source) no_eh_support
230               : # command line
231               : # input files
232               : # requirements
233                [ check-target-builds ../config//has_intel_quad : <cxxflags>-Qoption,cpp,--extended_float_type : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ]
234                <define>TEST_FLOAT128
235               : $(source:B)_intel_quad ] ;
236    }
237    return $(result) ;
238 }
239
240 test-suite functions_and_limits :
241
242       [ run test_numeric_limits.cpp no_eh_support
243               : # command line
244               : # input files
245               : # requirements
246               <define>TEST_BACKEND
247               : test_numeric_limits_backend_concept ]
248
249       [ run test_numeric_limits.cpp gmp no_eh_support
250               : # command line
251               : # input files
252               : # requirements
253               <define>TEST_MPF_50
254                [ check-target-builds ../config//has_gmp : : <build>no ]
255               : test_numeric_limits_mpf50 ]
256
257       [ run test_numeric_limits.cpp gmp no_eh_support
258               : # command line
259               : # input files
260               : # requirements
261               <define>TEST_MPF
262                [ check-target-builds ../config//has_gmp : : <build>no ]
263               : test_numeric_limits_mpf ]
264
265       [ run test_numeric_limits.cpp gmp no_eh_support
266               : # command line
267               : # input files
268               : # requirements
269               <define>TEST_MPZ
270                [ check-target-builds ../config//has_gmp : : <build>no ]
271               : test_numeric_limits_mpz ]
272
273       [ run test_numeric_limits.cpp gmp no_eh_support
274               : # command line
275               : # input files
276               : # requirements
277               <define>TEST_MPQ
278                [ check-target-builds ../config//has_gmp : : <build>no ]
279               : test_numeric_limits_mpq ]
280
281       [ run test_numeric_limits.cpp mpfr gmp no_eh_support
282               : # command line
283               : # input files
284               : # requirements
285               <define>TEST_MPFR
286                [ check-target-builds ../config//has_mpfr : : <build>no ]
287               : test_numeric_limits_mpfr ]
288
289       [ run test_numeric_limits.cpp mpfr gmp no_eh_support
290               : # command line
291               : # input files
292               : # requirements
293               <define>TEST_MPFR_50
294                [ check-target-builds ../config//has_mpfr : : <build>no ]
295               : test_numeric_limits_mpfr_50 ]
296
297       [ run test_numeric_limits.cpp no_eh_support
298               : # command line
299               : # input files
300               : # requirements
301               <define>TEST_CPP_DEC_FLOAT
302               : test_numeric_limits_cpp_dec_float ]
303
304       [ run test_numeric_limits.cpp no_eh_support
305               : # command line
306               : # input files
307               : # requirements
308               <define>TEST_CPP_BIN_FLOAT
309               : test_numeric_limits_cpp_bin_float ]
310
311       [ run test_numeric_limits.cpp $(TOMMATH) no_eh_support
312               : # command line
313               : # input files
314               : # requirements
315               <define>TEST_TOMMATH
316                [ check-target-builds ../config//has_tommath : : <build>no ]
317               : test_numeric_limits_tommath ]
318
319       [ run test_numeric_limits.cpp no_eh_support
320               : # command line
321               : # input files
322               : # requirements
323               <define>TEST_CPP_INT
324               : test_numeric_limits_cpp_int ]
325
326       [ run test_numeric_limits.cpp mpfi mpfr gmp no_eh_support
327               : # command line
328               : # input files
329               : # requirements
330               <define>TEST_MPFI_50
331                [ check-target-builds ../config//has_mpfi : : <build>no ]
332               : test_numeric_limits_mpfi_50 ]
333
334
335       [ run test_numeric_limits.cpp quadmath no_eh_support
336               : # command line
337               : # input files
338               : # requirements
339               <define>TEST_FLOAT128
340                [ check-target-builds ../config//has_float128 : : <build>no ]
341               : test_numeric_limits_float128 ]
342       [ run test_numeric_limits.cpp no_eh_support
343               : # command line
344               : # input files
345               : # requirements
346               <define>TEST_FLOAT128
347                [ check-target-builds ../config//has_intel_quad : <cxxflags>-Qoption,cpp,--extended_float_type : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ]
348               : test_numeric_limits_intel_quad ]
349
350       [ run test_sf_import_c99.cpp : : : <define>TEST_CPP_DEC_FLOAT_2 : test_sf_import_c99_cpp_dec_float_2 ]
351       [ run test_sf_import_c99.cpp : : : <define>TEST_CPP_DEC_FLOAT_3 : test_sf_import_c99_cpp_dec_float_3 ]
352       [ run test_sf_import_c99.cpp : : : <define>TEST_CPP_DEC_FLOAT_4 : test_sf_import_c99_cpp_dec_float_4 ]
353       [ run test_sf_import_c99.cpp : : : <define>TEST_CPP_DEC_FLOAT_5 : test_sf_import_c99_cpp_dec_float_5 ]
354       [ run test_sf_import_c99.cpp : : : <define>TEST_CPP_DEC_FLOAT_6 : test_sf_import_c99_cpp_dec_float_6 ]
355
356       [ run test_sf_import_c99.cpp : : : <define>TEST_CPP_BIN_FLOAT_2 : test_sf_import_c99_cpp_bin_float_2 ]
357       [ run test_sf_import_c99.cpp : : : <define>TEST_CPP_BIN_FLOAT_2 : test_sf_import_c99_cpp_bin_float_3 ]
358
359       [ run test_move.cpp mpfr gmp no_eh_support
360               : # command line
361               : # input files
362               : # requirements
363               <define>TEST_MPFR
364                [ check-target-builds ../config//has_mpfr : : <build>no ]
365               : test_move_mpfr ]
366
367       [ run test_move.cpp mpc mpfr gmp no_eh_support
368               : # command line
369               : # input files
370               : # requirements
371               <define>TEST_MPC
372                [ check-target-builds ../config//has_mpc : : <build>no ]
373               : test_move_mpc ]
374
375       [ run test_move.cpp gmp no_eh_support
376               : # command line
377               : # input files
378               : # requirements
379               <define>TEST_GMP
380                [ check-target-builds ../config//has_gmp : : <build>no ]
381               : test_move_gmp ]
382
383       [ run test_move.cpp $(TOMMATH) no_eh_support
384               : # command line
385               : # input files
386               : # requirements
387               <define>TEST_TOMMATH
388                [ check-target-builds ../config//has_tommath : : <build>no ]
389               : test_move_tommath ]
390
391       [ run test_move.cpp no_eh_support
392               : # command line
393               : # input files
394               : # requirements
395               <define>TEST_CPP_INT
396               : test_move_cpp_int ]
397
398       [ get_function_tests ]
399 ;
400
401 test-suite conversions :
402
403    [ run test_gmp_conversions.cpp gmp no_eh_support
404            : # command line
405            : # input files
406            : # requirements
407             [ check-target-builds ../config//has_gmp : : <build>no ] ]
408
409    [ run test_mpfr_conversions.cpp gmp mpfr no_eh_support
410            : # command line
411            : # input files
412            : # requirements
413             [ check-target-builds ../config//has_mpfr : : <build>no ] ]
414
415    [ run test_mpc_conversions.cpp gmp mpfr mpc no_eh_support
416            : # command line
417            : # input files
418            : # requirements
419             [ check-target-builds ../config//has_mpc : : <build>no ] ]
420
421    [ run test_constants.cpp gmp no_eh_support
422            : # command line
423            : # input files
424            : # requirements
425            <define>TEST_MPF_50
426             [ check-target-builds ../config//has_gmp : : <build>no ]
427            : test_constants_mpf50 ]
428
429    [ run test_constants.cpp mpfr gmp no_eh_support
430            : # command line
431            : # input files
432            : # requirements
433            <define>TEST_MPFR_50
434             [ check-target-builds ../config//has_mpfr : : <build>no ]
435            : test_constants_mpfr_50 ]
436
437    [ run test_constants.cpp no_eh_support
438            : # command line
439            : # input files
440            : # requirements
441            <define>TEST_CPP_DEC_FLOAT
442            : test_constants_cpp_dec_float ]
443
444
445    [ run test_test.cpp ]
446    [ run test_cpp_int_lit.cpp no_eh_support ]
447
448       #
449       # Interconversion tests:
450       #
451       [ run test_convert_from_cpp_int.cpp
452               : # command line
453               : # input files
454               : # requirements
455               [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
456               [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
457               [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
458               [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
459                [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ] 
460               ]
461       [ run test_convert_from_mpz_int.cpp
462               : # command line
463               : # input files
464               : # requirements
465               [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
466               [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
467               [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
468               [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
469                [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ] 
470               ]
471       [ run test_convert_from_tom_int.cpp
472               : # command line
473               : # input files
474               : # requirements
475               [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
476               [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
477               [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
478               [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
479                [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ] 
480               ]
481       [ run test_convert_from_cpp_rational.cpp
482               : # command line
483               : # input files
484               : # requirements
485               [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
486               [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
487               [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
488               [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
489                [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ] 
490               ]
491       [ run test_convert_from_gmp_rational.cpp
492               : # command line
493               : # input files
494               : # requirements
495               [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
496               [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
497               [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
498               [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
499                [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ] 
500               ]
501       [ run test_convert_from_tom_rational.cpp
502               : # command line
503               : # input files
504               : # requirements
505               [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
506               [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
507               [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
508               [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
509                [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ] 
510               ]
511       [ run test_convert_from_cpp_bin_float.cpp
512               : # command line
513               : # input files
514               : # requirements
515               [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
516               [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
517               [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
518               [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
519                [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ] 
520               ]
521       [ run test_convert_from_cpp_dec_float.cpp
522               : # command line
523               : # input files
524               : # requirements
525               [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
526               [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
527               [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
528               [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
529                [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ] 
530               ]
531       [ run test_convert_from_mpf_float.cpp
532               : # command line
533               : # input files
534               : # requirements
535               [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
536               [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
537               [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
538               [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
539                [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ] 
540               ]
541       [ run test_convert_from_mpfr_float.cpp
542               : # command line
543               : # input files
544               : # requirements
545               [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
546               [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
547               [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
548               [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
549                [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ] 
550               ]
551       [ run test_convert_from_mpfi_float.cpp
552               : # command line
553               : # input files
554               : # requirements
555               [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
556               [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
557               [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
558               [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
559                [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ] 
560               ]
561       [ run test_convert_from_float128.cpp
562               : # command line
563               : # input files
564               : # requirements
565               [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
566               [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
567               [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
568               [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
569                [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ] 
570               ]
571
572       [ run test_cpp_bin_float_conv.cpp ]
573
574       [ run test_cpp_bin_float_io.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono
575               : # command line
576               : # input files
577               : # requirements
578               <define>TEST_CPP_BIN_FLOAT
579                <define>TEST1
580                release # Otherwise [ runtime is slow
581               : test_cpp_bin_float_io_1
582               ]
583
584       [ run test_cpp_bin_float_io.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono
585               : # command line
586               : # input files
587               : # requirements
588               <define>TEST_CPP_BIN_FLOAT
589                <define>TEST2
590                release # Otherwise [ runtime is slow
591               : test_cpp_bin_float_io_2
592               ]
593
594       [ run test_cpp_bin_float.cpp no_eh_support mpfr gmp /boost/system//boost_system /boost/chrono//boost_chrono
595               : # command line
596               : # input files
597               : # requirements
598               <define>TEST_MPFR
599                [ check-target-builds ../config//has_mpfr : : <build>no ]
600                release # Otherwise [ runtime is slow
601               ]
602
603       [ run test_float_io.cpp no_eh_support
604               : # command line
605               : # input files
606               : # requirements
607               <define>TEST_CPP_DEC_FLOAT
608                release # Otherwise [ runtime is slow
609               : test_float_io_cpp_dec_float ]
610
611       [ run test_float_io.cpp gmp no_eh_support
612               : # command line
613               : # input files
614               : # requirements
615               <define>TEST_MPF_50
616                release # Otherwise [ runtime is slow
617                [ check-target-builds ../config//has_gmp : : <build>no ]
618               : test_float_io_mpf ]
619
620       [ run test_float_io.cpp mpfr gmp no_eh_support
621               : # command line
622               : # input files
623               : # requirements
624               <define>TEST_MPFR_50
625                release # Otherwise [ runtime is slow
626                [ check-target-builds ../config//has_mpfr : : <build>no ]
627               : test_float_io_mpfr ]
628
629       [ run test_float_io.cpp mpfi mpfr gmp no_eh_support
630               : # command line
631               : # input files
632               : # requirements
633               <define>TEST_MPFI_50
634                release # Otherwise [ runtime is slow
635                [ check-target-builds ../config//has_mpfi : : <build>no ]
636               : test_float_io_mpfi ]
637
638       [ run test_float_io.cpp quadmath no_eh_support
639               : # command line
640               : # input files
641               : # requirements
642               <define>TEST_FLOAT128
643                release # Otherwise [ runtime is slow
644                [ check-target-builds ../config//has_float128 : : <build>no ]
645               : test_float_io_float128 ]
646       [ run test_float_io.cpp no_eh_support
647               : # command line
648               : # input files
649               : # requirements
650               <define>TEST_FLOAT128
651                release # Otherwise [ runtime is slow
652                [ check-target-builds ../config//has_intel_quad : <cxxflags>-Qoption,cpp,--extended_float_type : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ]
653               : test_float_io_intel_quad ]
654
655       [ run test_int_io.cpp no_eh_support $(TOMMATH)
656               : # command line
657               : # input files
658               : # requirements
659               <define>TEST_TOMMATH
660                release # Otherwise [ runtime is slow
661                [ check-target-builds ../config//has_tommath : : <build>no ]
662               : test_int_io_tommath ]
663
664       [ run test_int_io.cpp no_eh_support gmp
665               : # command line
666               : # input files
667               : # requirements
668               <define>TEST_MPZ
669                release # Otherwise [ runtime is slow
670                [ check-target-builds ../config//has_gmp : : <build>no ]
671               : test_int_io_mpz ]
672
673 ;
674
675
676 test-suite cpp_int_tests :
677
678       [ run test_int_io.cpp no_eh_support
679            : # command line
680            : # input files
681            : # requirements
682            <define>TEST_CPP_INT
683             release # Otherwise    [ runtime is slow
684            : test_int_io_cpp_int ]
685
686       [ run test_cpp_int_left_shift.cpp gmp no_eh_support
687            : # command line
688            : # input files
689            : # requirements
690             [ check-target-builds ../config//has_gmp : : <build>no ]
691             release  # otherwise    [ runtime is too slow!!
692             ]
693
694       [ run test_cpp_int.cpp gmp no_eh_support
695            : # command line
696            : # input files
697            : # requirements
698             [ check-target-builds ../config//has_gmp : : <build>no ]
699             release  # otherwise    [ runtime is too slow!!
700             <define>TEST1
701             : test_cpp_int_1
702             ]
703
704       [ run test_cpp_int.cpp gmp no_eh_support
705            : # command line
706            : # input files
707            : # requirements
708             [ check-target-builds ../config//has_gmp : : <build>no ]
709             release  # otherwise    [ runtime is too slow!!
710             <define>TEST2
711             : test_cpp_int_2
712             ]
713
714       [ run test_cpp_int.cpp gmp no_eh_support
715            : # command line
716            : # input files
717            : # requirements
718             [ check-target-builds ../config//has_gmp : : <build>no ]
719             release  # otherwise    [ runtime is too slow!!
720             <define>TEST3
721             : test_cpp_int_3
722             ]
723
724       [ run test_cpp_int.cpp gmp no_eh_support
725            : # command line
726            : # input files
727            : # requirements
728             [ check-target-builds ../config//has_gmp : : <build>no ]
729             release  # otherwise    [ runtime is too slow!!
730             <define>TEST4
731             : test_cpp_int_4
732             ]
733
734       [ run test_cpp_int.cpp gmp no_eh_support
735            : # command line
736            : # input files
737            : # requirements
738             [ check-target-builds ../config//has_gmp : : <build>no ]
739             release  # otherwise    [ runtime is too slow!!
740             <define>TEST5
741             : test_cpp_int_5
742             ]
743
744       [ run test_checked_cpp_int.cpp no_eh_support ]
745       [ run test_unchecked_cpp_int.cpp no_eh_support : : : release ]
746
747       [ run test_cpp_int_serial.cpp ../../serialization/build//boost_serialization : : : release <define>TEST1 <toolset>gcc-mingw:<link>static : test_cpp_int_serial_1 ]
748       [ run test_cpp_int_serial.cpp ../../serialization/build//boost_serialization : : : release <define>TEST2 <toolset>gcc-mingw:<link>static : test_cpp_int_serial_2 ]
749       [ run test_cpp_int_serial.cpp ../../serialization/build//boost_serialization : : : release <define>TEST3 <toolset>gcc-mingw:<link>static : test_cpp_int_serial_3 ]
750       [ run test_cpp_int_serial.cpp ../../serialization/build//boost_serialization : : : release <define>TEST4 <toolset>gcc-mingw:<link>static : test_cpp_int_serial_4 ]
751       [ run test_cpp_int_deserial.cpp ../../serialization/build//boost_serialization ../../filesystem/build//boost_filesystem : $(here)/serial_txts : : release <toolset>gcc-mingw:<link>static  ]
752       [ run test_cpp_rat_serial.cpp ../../serialization/build//boost_serialization : : : release <toolset>gcc-mingw:<link>static  ]
753
754 ;
755
756 test-suite misc :
757
758       [ compile test_constexpr.cpp : 
759          [ check-target-builds ../config//has_float128 : <define>HAVE_FLOAT128 : ] 
760          [ check-target-builds ../config//has_intel_quad : <cxxflags>-Qoption,cpp,--extended_float_type <define>HAVE_FLOAT128 : ] 
761          [ requires cxx11_constexpr cxx11_user_defined_literals ] ]
762
763       [ compile constexpr_test_arithmetic_backend.cpp : 
764          [ requires cxx14_constexpr cxx17_if_constexpr ] ]
765       [ compile constexpr_test_float128.cpp : 
766          [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 : <source>quadmath : <build>no ] ]
767
768       [ run constexpr_test_cpp_int.cpp : : : [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_is_constant_evaluated : : <build>no ] ]
769       [ run constexpr_test_cpp_int_2.cpp : : : [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_is_constant_evaluated : : <build>no ] ]
770       [ run constexpr_test_cpp_int_3.cpp : : : [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_is_constant_evaluated : : <build>no ] ]
771       [ run constexpr_test_cpp_int_4.cpp : : : [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_is_constant_evaluated : : <build>no ] ]
772       [ run constexpr_test_cpp_int_5.cpp : : : [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_is_constant_evaluated : : <build>no ] ]
773       [ run constexpr_test_cpp_int_6.cpp : : : [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_is_constant_evaluated : <toolset>clang:<cxxflags>-fconstexpr-steps=268435456 : <build>no ] [ check-target-builds ../config//has_constexpr_limits : <cxxflags>-fconstexpr-ops-limit=268435456 ] ]
774       [ run constexpr_test_cpp_int_7.cpp : : : [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_is_constant_evaluated : <toolset>clang:<cxxflags>-fconstexpr-steps=268435456 : <build>no ] ]
775
776       [ compile test_nothrow_cpp_int.cpp ]
777       [ compile test_nothrow_cpp_rational.cpp ]
778       [ compile test_nothrow_cpp_bin_float.cpp ]
779       [ compile test_nothrow_cpp_dec_float.cpp ]
780       [ compile test_nothrow_float128.cpp : [ check-target-builds ../config//has_float128 : : <build>no ] ]
781       [ compile test_nothrow_gmp.cpp : [ check-target-builds ../config//has_gmp : : <build>no ] ]
782       [ compile test_nothrow_mpfr.cpp : [ check-target-builds ../config//has_mpfr : : <build>no ] ]
783
784       [ run test_miller_rabin.cpp no_eh_support gmp
785               : # command line
786               : # input files
787               : # requirements
788                [ check-target-builds ../config//has_gmp : : <build>no ]
789                release  # otherwise [ runtime is too slow!!
790                ]
791
792       [ run test_rational_io.cpp $(TOMMATH) no_eh_support
793               : # command line
794               : # input files
795               : # requirements
796               <define>TEST_TOMMATH
797                [ check-target-builds ../config//has_tommath : : <build>no ]
798                release # Otherwise [ runtime is slow
799               : test_rational_io_tommath ]
800
801       [ run test_rational_io.cpp gmp no_eh_support
802               : # command line
803               : # input files
804               : # requirements
805               <define>TEST_MPQ
806                [ check-target-builds ../config//has_gmp : : <build>no ]
807                release # Otherwise [ runtime is slow
808               : test_rational_io_mpz ]
809
810       [ run test_rational_io.cpp no_eh_support
811               : # command line
812               : # input files
813               : # requirements
814               <define>TEST_CPP_INT
815                release # Otherwise [ runtime is slow
816               : test_rational_io_cpp_int ]
817
818       [ run test_generic_conv.cpp no_eh_support
819               : # command line
820               : # input files
821               : # requirements
822                [ check-target-builds ../config//has_gmp : <define>TEST_GMP <source>gmp :  ]
823                [ check-target-builds ../config//has_tommath : <define>TEST_TOMMATH <source>$(TOMMATH) :  ]
824                [ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <source>mpfr :  ]
825                release # Otherwise [ runtime is slow
826                ]
827
828       [ run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono
829               : # command line
830               : # input files
831               : # requirements
832               <define>TEST1
833               release 
834               : test_rat_float_interconv_1 ]
835
836       [ run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono
837               : # command line
838               : # input files
839               : # requirements
840               <define>TEST2
841               release 
842               : test_rat_float_interconv_2 ]
843
844       [ run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono
845               : # command line
846               : # input files
847               : # requirements
848               <define>TEST3
849               release 
850               : test_rat_float_interconv_3 ]
851
852       [ run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono
853               : # command line
854               : # input files
855               : # requirements
856               <define>TEST4
857               release 
858               : test_rat_float_interconv_4 ]
859
860       [ run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono mpfr gmp
861               : # command line
862               : # input files
863               : # requirements
864               <define>TEST5
865               [ check-target-builds ../config//has_mpfr : : <build>no ]
866               release 
867               : test_rat_float_interconv_5 ]
868
869       [ run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono mpfr gmp
870               : # command line
871               : # input files
872               : # requirements
873               <define>TEST6
874               [ check-target-builds ../config//has_mpfr : : <build>no ]
875               release 
876               : test_rat_float_interconv_6 ]
877
878       [ run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono mpfr gmp
879               : # command line
880               : # input files
881               : # requirements
882               <define>TEST7
883               [ check-target-builds ../config//has_mpfr : : <build>no ]
884               release 
885               : test_rat_float_interconv_7 ]
886
887       [ run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono mpfr gmp
888               : # command line
889               : # input files
890               : # requirements
891               <define>TEST8
892               [ check-target-builds ../config//has_mpfr : : <build>no ]
893               release 
894               : test_rat_float_interconv_8 ]
895
896       [ run test_cpp_int_conv.cpp no_eh_support ]
897       [ run test_cpp_int_import_export.cpp no_eh_support ]
898       [ run test_native_integer.cpp no_eh_support ]
899
900       [ run test_mixed_cpp_int.cpp no_eh_support ]
901       [ run test_mixed_float.cpp no_eh_support
902               : # command line
903               : # input files
904               : # requirements
905                [ check-target-builds ../config//has_gmp : <define>TEST_GMP <library>gmp : ]
906                [ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <library>mpfr <library>gmp : ] ]
907       [ compile include_test/mpfr_include_test.cpp
908                     : # requirements
909                      [ check-target-builds ../config//has_mpfr : : <build>no ] ]
910       [ compile include_test/gmp_include_test.cpp
911                     : # requirements
912                      [ check-target-builds ../config//has_gmp : : <build>no ] ]
913       [ compile include_test/tommath_include_test.cpp
914                     : # requirements
915                      [ check-target-builds ../config//has_tommath : : <build>no ] ]
916       [ compile include_test/cpp_int_include_test.cpp ]
917       [ compile include_test/cpp_dec_float_include_test.cpp ]
918       [ compile include_test/cpp_bin_float_include_test.cpp ]
919
920       [ run ublas_interop/test1.cpp ublas_interop/test11.cpp ublas_interop/test12.cpp ublas_interop/test13.cpp no_eh_support ]
921       [ run ublas_interop/test2.cpp ublas_interop/test21.cpp ublas_interop/test22.cpp ublas_interop/test23.cpp no_eh_support ]
922       #[ run ublas_interop/test3.cpp ublas_interop/test31.cpp ublas_interop/test32.cpp ublas_interop/test33.cpp ]
923       [ run ublas_interop/test4.cpp ublas_interop/test42.cpp ublas_interop/test43.cpp no_eh_support ]
924       [ run ublas_interop/test5.cpp ublas_interop/test52.cpp ublas_interop/test53.cpp no_eh_support ]
925       [ run ublas_interop/test6.cpp ublas_interop/test62.cpp ublas_interop/test63.cpp no_eh_support ]
926       #[ run ublas_interop/test7.cpp ublas_interop/test71.cpp ublas_interop/test72.cpp ublas_interop/test73.cpp ]
927
928       [ run ublas_interop/test1.cpp ublas_interop/test11.cpp ublas_interop/test12.cpp ublas_interop/test13.cpp no_eh_support : : : <define>TEST_ET=1 : ublas1_et ]
929       [ run ublas_interop/test2.cpp ublas_interop/test21.cpp ublas_interop/test22.cpp ublas_interop/test23.cpp no_eh_support : : : <define>TEST_ET=1 : ublas2_et ]
930       #[ run ublas_interop/test3.cpp ublas_interop/test31.cpp ublas_interop/test32.cpp ublas_interop/test33.cpp : : : <define>TEST_ET=1 : ublas3_et ]
931       [ run ublas_interop/test4.cpp ublas_interop/test42.cpp ublas_interop/test43.cpp no_eh_support : : : <define>TEST_ET=1 : ublas3_et ]
932       [ run ublas_interop/test5.cpp ublas_interop/test52.cpp ublas_interop/test53.cpp no_eh_support : : : <define>TEST_ET=1 : ublas4_et ]
933       [ run ublas_interop/test6.cpp ublas_interop/test62.cpp ublas_interop/test63.cpp no_eh_support : : : <define>TEST_ET=1 : ublas5_et ]
934       #[ run ublas_interop/test7.cpp ublas_interop/test71.cpp ublas_interop/test72.cpp ublas_interop/test73.cpp : : : <define>TEST_ET=1 : ublas6_et ]
935
936       #
937       # Serialization tests, run in release mode so we cycle through more values:
938       #
939       [ run test_adapt_serial.cpp ../../serialization/build//boost_serialization : : : release <toolset>gcc-mingw:<link>static  ]
940       [ run test_cpp_dec_float_serial.cpp ../../serialization/build//boost_serialization : : : release <define>TEST1 <toolset>gcc-mingw:<link>static  : test_cpp_dec_float_serial_1 ]
941       [ run test_cpp_dec_float_serial.cpp ../../serialization/build//boost_serialization : : : release <define>TEST2 <toolset>gcc-mingw:<link>static  : test_cpp_dec_float_serial_2 ]
942       [ run test_float128_serial.cpp ../../serialization/build//boost_serialization quadmath : : : release <toolset>gcc-mingw:<link>static  [ check-target-builds ../config//has_float128 : : <build>no ]  ]
943       [ run test_cpp_bin_float_serial.cpp ../../serialization/build//boost_serialization : : : release <toolset>gcc-mingw:<link>static  <define>TEST1 : test_bin_dec_float_serial_1 ]
944       [ run test_cpp_bin_float_serial.cpp ../../serialization/build//boost_serialization : : : release <define>TEST2 <toolset>gcc-mingw:<link>static  : test_bin_dec_float_serial_2 ]
945
946       #
947       # Mixed mode comparison tests, see: https://svn.boost.org/trac/boost/ticket/11328
948       #
949       [ run test_checked_mixed_cpp_int.cpp no_eh_support ]
950       [ run test_mixed_cpp_bin_float.cpp no_eh_support ]
951       [ run test_mixed_cpp_dec_float.cpp no_eh_support ]
952       [ run test_mixed_mpf_float.cpp gmp no_eh_support : : : [ check-target-builds ../config//has_gmp : : <build>no ] ]
953       [ run test_mixed_mpfr_float.cpp  mpfr gmp no_eh_support : : : [ check-target-builds ../config//has_mpfr : : <build>no ] ]
954       #
955       # Check for narrowing conversions:
956       #
957       [ run test_float_conversions.cpp no_eh_support ]
958       #
959       # specific bug cases:
960       #
961       [ compile bug11922.cpp ]
962       [ run bug12039.cpp no_eh_support ]
963       [ compile git_issue_30.cpp ]
964       [ compile git_issue_98.cpp : 
965          [ check-target-builds ../config//has_float128 : <define>TEST_FLOAT128 <source>quadmath : ]
966          [ check-target-builds ../config//has_gmp : <define>TEST_GMP <source>gmp : ]
967          [ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <source>gmp <source>mpfr : ]
968          [ check-target-builds ../config//has_mpc : <define>TEST_MPC <source>gmp <source>mpfr <source>mpc : ] ]
969       [ run issue_13301.cpp ]
970       [ run issue_13148.cpp ]
971       [ run test_hash.cpp : : : 
972          [ check-target-builds ../config//has_float128 : <define>TEST_FLOAT128 <source>quadmath : ]
973          [ check-target-builds ../config//has_gmp : <define>TEST_GMP <source>gmp : ]
974          [ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <source>gmp <source>mpfr : ]
975          [ check-target-builds ../config//has_mpfi : <define>TEST_MPFI <source>gmp <source>mpfr <source>mpfi : ]
976          [ check-target-builds ../config//has_tommath : <define>TEST_TOMMATH <source>tommath : ]
977           ]
978       [ run test_optional_compat.cpp ]
979       #
980       # Eigen interoperability:
981       #
982       [ run test_eigen_interop_cpp_int.cpp : : : release [ check-target-builds ../config//has_eigen : : <build>no ] ]
983       [ run test_eigen_interop_cpp_dec_float.cpp : : : release [ check-target-builds ../config//has_eigen : : <build>no ] ]
984       [ run test_eigen_interop_cpp_dec_float_2.cpp : : : release [ check-target-builds ../config//has_eigen : : <build>no ] ]
985       [ run test_eigen_interop_cpp_dec_float_3.cpp : : : release [ check-target-builds ../config//has_eigen : : <build>no ] ]
986       [ run test_eigen_interop_cpp_bin_float_1.cpp : : : release [ check-target-builds ../config//has_eigen : : <build>no ] ]
987       [ run test_eigen_interop_cpp_bin_float_2.cpp : : : release [ check-target-builds ../config//has_eigen : : <build>no ] ]
988       [ run test_eigen_interop_cpp_bin_float_3.cpp : : : release [ check-target-builds ../config//has_eigen : : <build>no ] ]
989       [ run test_eigen_interop_mpfr_1.cpp mpfr gmp : : : release [ check-target-builds ../config//has_eigen : : <build>no ] [ check-target-builds ../config//has_mpfr : : <build>no ] ]
990       [ run test_eigen_interop_mpfr_2.cpp mpfr gmp : : : release [ check-target-builds ../config//has_eigen : : <build>no ] [ check-target-builds ../config//has_mpfr : : <build>no ] ]
991       [ run test_eigen_interop_mpfr_3.cpp mpfr gmp : : : release [ check-target-builds ../config//has_eigen : : <build>no ] [ check-target-builds ../config//has_mpfr : : <build>no ] ]
992       [ run test_eigen_interop_gmp.cpp gmp : : : release [ check-target-builds ../config//has_eigen : : <build>no ] [ check-target-builds ../config//has_gmp : : <build>no ] ]
993       [ run test_eigen_interop_mpc.cpp mpc mpfr gmp : : : release [ check-target-builds ../config//has_eigen : : <build>no ] [ check-target-builds ../config//has_mpc : : <build>no ] ]
994 ;
995
996
997 #
998 # This take too long to run as a regular part of the tests:
999 #
1000 run test_cpp_bin_float_round.cpp mpfr gmp ;
1001 explicit test_cpp_bin_float_round ;
1002
1003 rule get_specfun_tests
1004 {
1005    local result ;
1006    for local source in [ glob math/*.cpp ]
1007    {
1008       result += [ run $(source) mpfr gmp 
1009             /boost/test//boost_unit_test_framework/<link>static 
1010             /boost/regex//boost_regex/<link>static 
1011             math/instances//test_instances_mpfr/<link>static
1012            : # command line
1013            : # input files
1014            : # requirements
1015             [ check-target-builds ../config//has_mpfr : : <build>no ]
1016             <define>TEST_MPFR_50
1017             <optimization>speed
1018             <define>BOOST_ALL_NO_LIB
1019             <define>BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
1020             <toolset>msvc:<cxxflags>-bigobj
1021             <include>../../math/include_private
1022             release
1023            : $(source:B)_mpfr ] ;
1024       result += [ run $(source) gmp 
1025             /boost/test//boost_unit_test_framework/<link>static 
1026             /boost/regex//boost_regex/<link>static
1027             math/instances//test_instances_mpf/<link>static
1028            : # command line
1029            : # input files
1030            : # requirements
1031             [ check-target-builds ../config//has_gmp : : <build>no ]
1032             <optimization>speed
1033             <define>TEST_MPF_50
1034             <define>BOOST_ALL_NO_LIB
1035             <define>BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
1036             <toolset>msvc:<cxxflags>-bigobj
1037             <include>../../math/include_private
1038             release
1039            : $(source:B)_mpf ] ;
1040       result += [ run $(source) /boost/test//boost_unit_test_framework/<link>static 
1041                /boost/regex//boost_regex/<link>static
1042                math/instances//test_instances_cpp_dec_float/<link>static
1043            : # command line
1044            : # input files
1045            : # requirements
1046             <define>TEST_CPP_DEC_FLOAT
1047             <define>BOOST_ALL_NO_LIB
1048             <define>BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
1049             <optimization>speed
1050             <toolset>msvc:<cxxflags>-bigobj
1051             <include>../../math/include_private
1052             release
1053            : $(source:B)_cpp_dec_float ] ;
1054       result += [ run $(source) /boost/test//boost_unit_test_framework/<link>static 
1055                /boost/regex//boost_regex/<link>static
1056                math/instances//test_instances_cpp_bin_float/<link>static
1057            : # command line
1058            : # input files
1059            : # requirements
1060             <define>TEST_CPP_BIN_FLOAT
1061             <define>BOOST_ALL_NO_LIB
1062             <define>BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
1063             <optimization>speed
1064             <toolset>msvc:<cxxflags>-bigobj
1065             <include>../../math/include_private
1066             release
1067            : $(source:B)_cpp_bin_float ] ;
1068       result += [ run $(source) quadmath 
1069             /boost/test//boost_unit_test_framework/<link>static 
1070             /boost/regex//boost_regex/<link>static
1071             math/instances//test_instances_float128/<link>static
1072            : # command line
1073            : # input files
1074            : # requirements
1075             [ check-target-builds ../config//has_float128 : : <build>no ]
1076             <optimization>speed
1077             <define>TEST_FLOAT128
1078             <define>BOOST_ALL_NO_LIB
1079             <define>BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
1080             <toolset>msvc:<cxxflags>-bigobj
1081             <include>../../math/include_private
1082             release
1083            : $(source:B)_float128 ] ;
1084       result += [ run $(source)
1085             /boost/test//boost_unit_test_framework/<link>static 
1086             /boost/regex//boost_regex/<link>static
1087             math/instances//test_instances_intel_quad/<link>static
1088            : # command line
1089            : # input files
1090            : # requirements
1091             [ check-target-builds ../config//has_intel_quad : <cxxflags>-Qoption,cpp,--extended_float_type : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ]
1092             <optimization>speed
1093             <define>TEST_FLOAT128
1094             <define>BOOST_ALL_NO_LIB
1095             <define>BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
1096             <toolset>msvc:<cxxflags>-bigobj
1097             <include>../../math/include_private
1098             release
1099            : $(source:B)_intel_quad ] ;
1100    }
1101    #
1102    # High precision tests are rather different, as they test only one
1103    # multiprecision type and are more a test of Boost.Math:
1104    #
1105    for local source in [ glob math/high_prec/*.cpp ]
1106    {
1107       result += [ run $(source)
1108             /boost/test//boost_unit_test_framework/<link>static 
1109             /boost/regex//boost_regex/<link>static 
1110            : # command line
1111            : # input files
1112            : # requirements
1113             <optimization>speed
1114             <define>BOOST_ALL_NO_LIB
1115             <define>BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
1116             <toolset>msvc:<cxxflags>-bigobj
1117             [ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <source>gmp <source>mpfr :  ]
1118             <include>../../math/include_private
1119             release ] ;
1120    }
1121    return $(result) ;
1122 }
1123
1124 test-suite specfun : [ get_specfun_tests ] ;
1125 explicit specfun ;
1126
1127 rule get_compile_fail_tests
1128 {
1129
1130    local compile_fail_tests ;
1131
1132    for local source in [ glob compile_fail/*.cpp ]
1133    {
1134       compile_fail_tests +=  $(source:B) ;
1135       compile-fail $(source)
1136       :
1137          [ check-target-builds ../config//has_gmp : <define>TEST_GMP <debug-symbols>off : ]
1138          [ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <debug-symbols>off : ]
1139       ;
1140    }
1141    return $(compile_fail_tests) ;
1142 }
1143
1144 test-suite compile_fail :  [ get_compile_fail_tests ] ;
1145
1146 rule get_concept_checks
1147 {
1148    local result ;
1149    for local source in [ glob concepts/*.cpp ]
1150    {
1151
1152       result += [ compile $(source)  mpfr
1153               : # requirements
1154               <define>TEST_MPFR_50
1155                [ check-target-builds ../config//has_mpfr : : <build>no ]
1156                <debug-symbols>off
1157                <optimization>space
1158               : $(source:B)_mpfr_50 ] ;
1159
1160       result += [ compile $(source)  mpfr
1161               : # requirements
1162               <define>TEST_MPFR_6
1163                [ check-target-builds ../config//has_mpfr : : <build>no ]
1164                <debug-symbols>off
1165                <optimization>space
1166               : $(source:B)_mpfr_6 ] ;
1167
1168       result += [ compile $(source)  mpfr
1169               : # requirements
1170               <define>TEST_MPFR_15
1171                [ check-target-builds ../config//has_mpfr : : <build>no ]
1172                <debug-symbols>off
1173                <optimization>space
1174               : $(source:B)_mpfr_15 ] ;
1175
1176       result += [ compile $(source)  mpfr
1177               : # requirements
1178               <define>TEST_MPFR_17
1179                [ check-target-builds ../config//has_mpfr : : <build>no ]
1180                <debug-symbols>off
1181                <optimization>space
1182               : $(source:B)_mpfr_17 ] ;
1183
1184       result += [ compile $(source)  mpfr
1185               : # requirements
1186               <define>TEST_MPFR_30
1187                [ check-target-builds ../config//has_mpfr : : <build>no ]
1188                <debug-symbols>off
1189                <optimization>space
1190               : $(source:B)_mpfr_30 ] ;
1191
1192       result += [ compile $(source)  gmp
1193               : # requirements
1194               <define>TEST_MPF_50
1195                [ check-target-builds ../config//has_gmp : : <build>no ]
1196                <debug-symbols>off
1197                <optimization>space
1198               : $(source:B)_mpf50 ] ;
1199
1200       result += [ compile $(source)
1201               : # requirements
1202               <define>TEST_CPP_DEC_FLOAT
1203                <debug-symbols>off
1204                <optimization>space
1205               : $(source:B)_cpp_dec_float ] ;
1206
1207       result += [ compile $(source)
1208               : # requirements
1209               <define>TEST_CPP_BIN_FLOAT
1210                <debug-symbols>off
1211                <optimization>space
1212               : $(source:B)_cpp_bin_float ] ;
1213
1214       result += [ compile $(source)
1215               : # requirements
1216               <define>TEST_CPP_DEC_FLOAT_NO_ET
1217                <debug-symbols>off
1218                <optimization>space
1219               : $(source:B)_cpp_dec_float_no_et ] ;
1220
1221       result += [ compile $(source)
1222               : # requirements
1223               <define>TEST_BACKEND
1224                <debug-symbols>off
1225                <optimization>space
1226               : $(source:B)_backend_concept ] ;
1227
1228       result += [ compile $(source)
1229               : # requirements
1230               <define>TEST_LOGGED_ADAPTER
1231                <debug-symbols>off
1232                <optimization>space
1233               : $(source:B)_logged_adaptor ] ;
1234    }
1235    return $(result) ;
1236 }
1237
1238 test-suite concepts : [ get_concept_checks ] ;
1239
1240 test-suite examples : ../example//examples ;