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.
9 import ../../config/checks/config : requires ;
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 ] ;
17 project : requirements
19 <include>$(gmp_path)/mpfr
20 <include>$(gmp_path)/gmpfrxx
23 <include>$(mpfi_path)/src
24 <include>$(tommath_path)
27 # We set these to make it easier to set up and test GMP and MPFR under Win32:
28 <toolset>msvc:<runtime-link>static
29 <toolset>msvc:<link>static
30 <toolset>msvc:<warnings>all
31 <toolset>msvc:<cxxflags>/fp:precise
32 <toolset>intel-win:<runtime-link>static
33 <toolset>intel-win:<link>static
35 <toolset>msvc:<debug-symbols>off
36 <toolset>intel:<debug-symbols>off
37 <toolset>gcc:<cxxflags>-Wall
38 <toolset>gcc:<cxxflags>-Wextra
39 <toolset>intel:<define>SLOW_COMPILER
40 <toolset>msvc,<optimization>off:<cxxflags>-RTC1
41 # We can't yet enable this - it breaks the STL in some tests...
42 #<toolset>msvc,<optimization>off:<cxxflags>-RTCc
43 #<toolset>msvc,<optimization>off:<define>_ALLOW_RTCc_IN_STL
46 local enable-specfun = [ MATCH (--enable-specfun) : [ modules.peek : ARGV ] ] ;
47 local disable-concepts = [ MATCH (--disable-concepts) : [ modules.peek : ARGV ] ] ;
49 lib gmp : : <search>$(gmp_path) ;
50 lib mpfr : : <search>$(gmp_path) <search>$(mpfr_path) <search>$(mpfr_path)/build.vc10/lib/Win32/Debug ;
51 lib mpfi : : <search>$(gmp_path) <search>$(mpfr_path) <search>$(mpfr_path)/build.vc10/lib/Win32/Debug <search>$(mpfi_path) <search>$(mpfi_path)/src ;
56 lib tommath : [ GLOB $(tommath_path) : *.c ] ;
61 lib tommath : : <search>$(tommath_path) ;
65 lib no_eh_support : no_eh_test_support.cpp ;
67 run test_arithmetic_backend_concept.cpp no_eh_support ;
69 run test_arithmetic_cpp_dec_float_1.cpp no_eh_support ;
70 run test_arithmetic_cpp_dec_float_2.cpp no_eh_support ;
71 run test_arithmetic_cpp_dec_float_3.cpp no_eh_support ;
73 run test_arithmetic_cpp_bin_float_1.cpp no_eh_support ;
74 run test_arithmetic_cpp_bin_float_2.cpp no_eh_support ;
75 run test_arithmetic_cpp_bin_float_3.cpp no_eh_support ;
77 run test_arithmetic_mpf_50.cpp gmp no_eh_support : : : [ check-target-builds ../config//has_gmp : : <build>no ] ;
78 run test_arithmetic_mpf.cpp gmp no_eh_support : : : [ check-target-builds ../config//has_gmp : : <build>no ] ;
79 run test_arithmetic_mpz.cpp gmp no_eh_support : : : [ check-target-builds ../config//has_gmp : : <build>no ] ;
80 run test_arithmetic_mpz_rat.cpp gmp no_eh_support : : : [ check-target-builds ../config//has_gmp : : <build>no ] ;
81 run test_arithmetic_mpz_br.cpp gmp no_eh_support : : : [ check-target-builds ../config//has_gmp : : <build>no ] ;
82 run test_arithmetic_mpq.cpp gmp no_eh_support : : : [ check-target-builds ../config//has_gmp : : <build>no ] ;
84 run test_arithmetic_mpfr.cpp mpfr gmp no_eh_support : : : [ check-target-builds ../config//has_mpfr : : <build>no ] ;
85 run test_arithmetic_mpfr_50.cpp mpfr gmp no_eh_support : : : [ check-target-builds ../config//has_mpfr : : <build>no ] ;
86 run test_arithmetic_mpfr_50_static.cpp mpfr gmp no_eh_support : : : [ check-target-builds ../config//has_mpfr : : <build>no ] ;
88 run test_arithmetic_tommath.cpp $(TOMMATH) no_eh_support : : : [ check-target-builds ../config//has_tommath : : <build>no ] ;
89 run test_arithmetic_tommath_rat.cpp $(TOMMATH) no_eh_support : : : [ check-target-builds ../config//has_tommath : : <build>no ] ;
90 run test_arithmetic_tommath_br.cpp $(TOMMATH) no_eh_support : : : [ check-target-builds ../config//has_tommath : : <build>no ] ;
92 run test_arithmetic_cpp_int_1.cpp no_eh_support ;
93 run test_arithmetic_cpp_int_2.cpp no_eh_support ;
94 run test_arithmetic_cpp_int_3.cpp no_eh_support ;
95 run test_arithmetic_cpp_int_4.cpp no_eh_support ;
96 run test_arithmetic_cpp_int_5.cpp no_eh_support ;
97 run test_arithmetic_cpp_int_6.cpp no_eh_support ;
98 run test_arithmetic_cpp_int_7.cpp no_eh_support ;
99 run test_arithmetic_cpp_int_8.cpp no_eh_support ;
100 run test_arithmetic_cpp_int_9.cpp no_eh_support ;
101 run test_arithmetic_cpp_int_10.cpp no_eh_support ;
102 run test_arithmetic_cpp_int_11.cpp no_eh_support ;
103 run test_arithmetic_cpp_int_12.cpp no_eh_support ;
104 run test_arithmetic_cpp_int_13.cpp no_eh_support ;
105 run test_arithmetic_cpp_int_14.cpp no_eh_support ;
106 run test_arithmetic_cpp_int_15.cpp no_eh_support ;
107 run test_arithmetic_cpp_int_16.cpp no_eh_support ;
108 run test_arithmetic_cpp_int_17.cpp no_eh_support ;
109 run test_arithmetic_cpp_int_18.cpp no_eh_support ;
110 run test_arithmetic_cpp_int_br.cpp no_eh_support ;
112 run test_arithmetic_ab_1.cpp no_eh_support ;
113 run test_arithmetic_ab_2.cpp no_eh_support ;
114 run test_arithmetic_ab_3.cpp no_eh_support ;
116 run test_cpp_dec_float_round.cpp no_eh_support ;
118 run test_arithmetic_logged_1.cpp no_eh_support ;
119 run test_arithmetic_logged_2.cpp no_eh_support ;
121 run test_arithmetic_dbg_adptr1.cpp no_eh_support ;
122 run test_arithmetic_dbg_adptr2.cpp no_eh_support ;
124 run test_arithmetic_mpfi_50.cpp mpfi mpfr gmp no_eh_support : : : [ check-target-builds ../config//has_mpfi : : <build>no ] ;
126 run test_arithmetic_float_128.cpp quadmath no_eh_support : : : [ check-target-builds ../config//has_float128 : : <build>no ] ;
127 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 ;
129 run test_numeric_limits.cpp no_eh_support
134 : test_numeric_limits_backend_concept ;
136 run test_numeric_limits.cpp gmp no_eh_support
141 [ check-target-builds ../config//has_gmp : : <build>no ]
142 : test_numeric_limits_mpf50 ;
144 run test_numeric_limits.cpp gmp no_eh_support
149 [ check-target-builds ../config//has_gmp : : <build>no ]
150 : test_numeric_limits_mpf ;
152 run test_numeric_limits.cpp gmp no_eh_support
157 [ check-target-builds ../config//has_gmp : : <build>no ]
158 : test_numeric_limits_mpz ;
160 run test_numeric_limits.cpp gmp no_eh_support
165 [ check-target-builds ../config//has_gmp : : <build>no ]
166 : test_numeric_limits_mpq ;
168 run test_numeric_limits.cpp mpfr gmp no_eh_support
173 [ check-target-builds ../config//has_mpfr : : <build>no ]
174 : test_numeric_limits_mpfr ;
176 run test_numeric_limits.cpp mpfr gmp no_eh_support
181 [ check-target-builds ../config//has_mpfr : : <build>no ]
182 : test_numeric_limits_mpfr_50 ;
184 run test_numeric_limits.cpp no_eh_support
188 <define>TEST_CPP_DEC_FLOAT
189 : test_numeric_limits_cpp_dec_float ;
191 run test_numeric_limits.cpp no_eh_support
195 <define>TEST_CPP_BIN_FLOAT
196 : test_numeric_limits_cpp_bin_float ;
198 run test_numeric_limits.cpp $(TOMMATH) no_eh_support
203 [ check-target-builds ../config//has_tommath : : <build>no ]
204 : test_numeric_limits_tommath ;
206 run test_numeric_limits.cpp no_eh_support
211 : test_numeric_limits_cpp_int ;
213 run test_numeric_limits.cpp mpfi mpfr gmp no_eh_support
218 [ check-target-builds ../config//has_mpfi : : <build>no ]
219 : test_numeric_limits_mpfi_50 ;
222 run test_numeric_limits.cpp quadmath no_eh_support
226 <define>TEST_FLOAT128
227 [ check-target-builds ../config//has_float128 : : <build>no ]
228 : test_numeric_limits_float128 ;
229 run test_numeric_limits.cpp no_eh_support
233 <define>TEST_FLOAT128
234 [ check-target-builds ../config//has_intel_quad : <cxxflags>-Qoption,cpp,--extended_float_type : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ]
235 : test_numeric_limits_intel_quad ;
237 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
239 run $(source) gmp no_eh_support
243 [ check-target-builds ../config//has_gmp : : <build>no ]
245 : $(source:B)_mpf50 ;
246 run $(source) mpfr gmp no_eh_support
250 [ check-target-builds ../config//has_mpfr : : <build>no ]
252 : $(source:B)_mpfr50 ;
253 run $(source) mpfi mpfr gmp no_eh_support
257 [ check-target-builds ../config//has_mpfi : : <build>no ]
259 : $(source:B)_mpfi50 ;
260 run $(source) no_eh_support
264 <define>TEST_CPP_DEC_FLOAT
265 : $(source:B)_cpp_dec_float ;
266 run $(source) no_eh_support
270 <define>TEST_CPP_BIN_FLOAT
271 : $(source:B)_cpp_bin_float ;
272 run $(source) quadmath no_eh_support
276 [ check-target-builds ../config//has_float128 : : <build>no ]
277 <define>TEST_FLOAT128
278 : $(source:B)_float128 ;
279 run $(source) no_eh_support
283 [ check-target-builds ../config//has_intel_quad : <cxxflags>-Qoption,cpp,--extended_float_type : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ]
284 <define>TEST_FLOAT128
285 : $(source:B)_intel_quad ;
288 run test_sf_import_c99.cpp : : : <define>TEST_CPP_DEC_FLOAT_2 : test_sf_import_c99_cpp_dec_float_2 ;
289 run test_sf_import_c99.cpp : : : <define>TEST_CPP_DEC_FLOAT_3 : test_sf_import_c99_cpp_dec_float_3 ;
290 run test_sf_import_c99.cpp : : : <define>TEST_CPP_DEC_FLOAT_4 : test_sf_import_c99_cpp_dec_float_4 ;
291 run test_sf_import_c99.cpp : : : <define>TEST_CPP_DEC_FLOAT_5 : test_sf_import_c99_cpp_dec_float_5 ;
293 run test_gmp_conversions.cpp gmp no_eh_support
297 [ check-target-builds ../config//has_gmp : : <build>no ] ;
299 run test_mpfr_conversions.cpp gmp mpfr no_eh_support
303 [ check-target-builds ../config//has_mpfr : : <build>no ] ;
305 run test_constants.cpp gmp no_eh_support
310 [ check-target-builds ../config//has_gmp : : <build>no ]
311 : test_constants_mpf50 ;
313 run test_constants.cpp mpfr gmp no_eh_support
318 [ check-target-builds ../config//has_mpfr : : <build>no ]
319 : test_constants_mpfr_50 ;
321 run test_constants.cpp no_eh_support
325 <define>TEST_CPP_DEC_FLOAT
326 : test_constants_cpp_dec_float ;
329 run test_move.cpp mpfr gmp no_eh_support
334 [ check-target-builds ../config//has_mpfr : : <build>no ]
337 run test_move.cpp gmp no_eh_support
342 [ check-target-builds ../config//has_gmp : : <build>no ]
345 run test_move.cpp $(TOMMATH) no_eh_support
350 [ check-target-builds ../config//has_tommath : : <build>no ]
351 : test_move_tommath ;
353 run test_move.cpp no_eh_support
358 : test_move_cpp_int ;
361 run test_cpp_int_lit.cpp no_eh_support ;
362 compile test_constexpr.cpp :
363 [ check-target-builds ../config//has_float128 : <define>HAVE_FLOAT128 : ]
364 [ check-target-builds ../config//has_intel_quad : <cxxflags>-Qoption,cpp,--extended_float_type <define>HAVE_FLOAT128 : ]
365 [ requires cxx11_constexpr cxx11_user_defined_literals ] ;
367 compile test_nothrow_cpp_int.cpp ;
368 compile test_nothrow_cpp_rational.cpp ;
369 compile test_nothrow_cpp_bin_float.cpp ;
370 compile test_nothrow_cpp_dec_float.cpp ;
371 compile test_nothrow_float128.cpp : [ check-target-builds ../config//has_float128 : : <build>no ] ;
372 compile test_nothrow_gmp.cpp : [ check-target-builds ../config//has_gmp : : <build>no ] ;
373 compile test_nothrow_mpfr.cpp : [ check-target-builds ../config//has_mpfr : : <build>no ] ;
376 # Interconversion tests:
378 run test_convert_from_cpp_int.cpp
382 [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
383 [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
384 [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
385 [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
386 [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ]
388 run test_convert_from_mpz_int.cpp
392 [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
393 [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
394 [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
395 [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
396 [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ]
398 run test_convert_from_tom_int.cpp
402 [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
403 [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
404 [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
405 [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
406 [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ]
408 run test_convert_from_cpp_rational.cpp
412 [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
413 [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
414 [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
415 [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
416 [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ]
418 run test_convert_from_gmp_rational.cpp
422 [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
423 [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
424 [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
425 [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
426 [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ]
428 run test_convert_from_tom_rational.cpp
432 [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
433 [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
434 [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
435 [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
436 [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ]
438 run test_convert_from_cpp_bin_float.cpp
442 [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
443 [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
444 [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
445 [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
446 [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ]
448 run test_convert_from_cpp_dec_float.cpp
452 [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
453 [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
454 [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
455 [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
456 [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ]
458 run test_convert_from_mpf_float.cpp
462 [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
463 [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
464 [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
465 [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
466 [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ]
468 run test_convert_from_mpfr_float.cpp
472 [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
473 [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
474 [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
475 [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
476 [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ]
478 run test_convert_from_mpfi_float.cpp
482 [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
483 [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
484 [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
485 [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
486 [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ]
488 run test_convert_from_float128.cpp
492 [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
493 [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
494 [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
495 [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
496 [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ]
501 # This take too long to run as a regular part of the tests:
503 run test_cpp_bin_float_round.cpp mpfr gmp ;
504 explicit test_cpp_bin_float_round ;
506 run test_cpp_bin_float_conv.cpp ;
508 run test_cpp_bin_float_io.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono
512 <define>TEST_CPP_BIN_FLOAT
514 release # Otherwise runtime is slow
515 : test_cpp_bin_float_io_1
518 run test_cpp_bin_float_io.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono
522 <define>TEST_CPP_BIN_FLOAT
524 release # Otherwise runtime is slow
525 : test_cpp_bin_float_io_2
528 run test_cpp_bin_float.cpp no_eh_support mpfr gmp /boost/system//boost_system /boost/chrono//boost_chrono
533 [ check-target-builds ../config//has_mpfr : : <build>no ]
534 release # Otherwise runtime is slow
537 run test_float_io.cpp no_eh_support
541 <define>TEST_CPP_DEC_FLOAT
542 release # Otherwise runtime is slow
543 : test_float_io_cpp_dec_float ;
545 run test_float_io.cpp gmp no_eh_support
550 release # Otherwise runtime is slow
551 [ check-target-builds ../config//has_gmp : : <build>no ]
552 : test_float_io_mpf ;
554 run test_float_io.cpp mpfr gmp no_eh_support
559 release # Otherwise runtime is slow
560 [ check-target-builds ../config//has_mpfr : : <build>no ]
561 : test_float_io_mpfr ;
563 run test_float_io.cpp mpfi mpfr gmp no_eh_support
568 release # Otherwise runtime is slow
569 [ check-target-builds ../config//has_mpfi : : <build>no ]
570 : test_float_io_mpfi ;
572 run test_float_io.cpp quadmath no_eh_support
576 <define>TEST_FLOAT128
577 release # Otherwise runtime is slow
578 [ check-target-builds ../config//has_float128 : : <build>no ]
579 : test_float_io_float128 ;
580 run test_float_io.cpp no_eh_support
584 <define>TEST_FLOAT128
585 release # Otherwise runtime is slow
586 [ check-target-builds ../config//has_intel_quad : <cxxflags>-Qoption,cpp,--extended_float_type : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ]
587 : test_float_io_intel_quad ;
589 run test_int_io.cpp no_eh_support $(TOMMATH)
594 release # Otherwise runtime is slow
595 [ check-target-builds ../config//has_tommath : : <build>no ]
596 : test_int_io_tommath ;
598 run test_int_io.cpp no_eh_support gmp
603 release # Otherwise runtime is slow
604 [ check-target-builds ../config//has_gmp : : <build>no ]
607 run test_int_io.cpp no_eh_support
612 release # Otherwise runtime is slow
613 : test_int_io_cpp_int ;
615 run test_cpp_int_left_shift.cpp gmp no_eh_support
619 [ check-target-builds ../config//has_gmp : : <build>no ]
620 release # otherwise runtime is too slow!!
623 run test_cpp_int.cpp gmp no_eh_support
627 [ check-target-builds ../config//has_gmp : : <build>no ]
628 release # otherwise runtime is too slow!!
633 run test_cpp_int.cpp gmp no_eh_support
637 [ check-target-builds ../config//has_gmp : : <build>no ]
638 release # otherwise runtime is too slow!!
643 run test_cpp_int.cpp gmp no_eh_support
647 [ check-target-builds ../config//has_gmp : : <build>no ]
648 release # otherwise runtime is too slow!!
653 run test_cpp_int.cpp gmp no_eh_support
657 [ check-target-builds ../config//has_gmp : : <build>no ]
658 release # otherwise runtime is too slow!!
663 run test_cpp_int.cpp gmp no_eh_support
667 [ check-target-builds ../config//has_gmp : : <build>no ]
668 release # otherwise runtime is too slow!!
673 run test_checked_cpp_int.cpp no_eh_support ;
674 run test_unchecked_cpp_int.cpp no_eh_support : : : release ;
676 run test_miller_rabin.cpp no_eh_support gmp
680 [ check-target-builds ../config//has_gmp : : <build>no ]
681 release # otherwise runtime is too slow!!
684 run test_rational_io.cpp $(TOMMATH) no_eh_support
689 [ check-target-builds ../config//has_tommath : : <build>no ]
690 release # Otherwise runtime is slow
691 : test_rational_io_tommath ;
693 run test_rational_io.cpp gmp no_eh_support
698 [ check-target-builds ../config//has_gmp : : <build>no ]
699 release # Otherwise runtime is slow
700 : test_rational_io_mpz ;
702 run test_rational_io.cpp no_eh_support
707 release # Otherwise runtime is slow
708 : test_rational_io_cpp_int ;
710 run test_generic_conv.cpp no_eh_support
714 [ check-target-builds ../config//has_gmp : <define>TEST_GMP <source>gmp : ]
715 [ check-target-builds ../config//has_tommath : <define>TEST_TOMMATH <source>$(TOMMATH) : ]
716 [ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <source>mpfr : ]
717 release # Otherwise runtime is slow
720 run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono
726 : test_rat_float_interconv_1 ;
728 run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono
734 : test_rat_float_interconv_2 ;
736 run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono
742 : test_rat_float_interconv_3 ;
744 run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono
750 : test_rat_float_interconv_4 ;
752 run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono mpfr gmp
757 [ check-target-builds ../config//has_mpfr : : <build>no ]
759 : test_rat_float_interconv_5 ;
761 run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono mpfr gmp
766 [ check-target-builds ../config//has_mpfr : : <build>no ]
768 : test_rat_float_interconv_6 ;
770 run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono mpfr gmp
775 [ check-target-builds ../config//has_mpfr : : <build>no ]
777 : test_rat_float_interconv_7 ;
779 run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono mpfr gmp
784 [ check-target-builds ../config//has_mpfr : : <build>no ]
786 : test_rat_float_interconv_8 ;
788 build-project ../example ;
791 run test_cpp_int_conv.cpp no_eh_support ;
792 run test_cpp_int_import_export.cpp no_eh_support ;
793 run test_native_integer.cpp no_eh_support ;
795 run test_mixed_cpp_int.cpp no_eh_support ;
796 run test_mixed_float.cpp no_eh_support
800 [ check-target-builds ../config//has_gmp : <define>TEST_GMP <library>gmp : ]
801 [ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <library>mpfr <library>gmp : ] ;
803 compile include_test/mpfr_include_test.cpp
805 [ check-target-builds ../config//has_mpfr : : <build>no ] ;
806 compile include_test/gmp_include_test.cpp
808 [ check-target-builds ../config//has_gmp : : <build>no ] ;
809 compile include_test/tommath_include_test.cpp
811 [ check-target-builds ../config//has_tommath : : <build>no ] ;
812 compile include_test/cpp_int_include_test.cpp ;
813 compile include_test/cpp_dec_float_include_test.cpp ;
814 compile include_test/cpp_bin_float_include_test.cpp ;
816 run ublas_interop/test1.cpp ublas_interop/test11.cpp ublas_interop/test12.cpp ublas_interop/test13.cpp no_eh_support ;
817 run ublas_interop/test2.cpp ublas_interop/test21.cpp ublas_interop/test22.cpp ublas_interop/test23.cpp no_eh_support ;
818 #run ublas_interop/test3.cpp ublas_interop/test31.cpp ublas_interop/test32.cpp ublas_interop/test33.cpp ;
819 run ublas_interop/test4.cpp ublas_interop/test42.cpp ublas_interop/test43.cpp no_eh_support ;
820 run ublas_interop/test5.cpp ublas_interop/test52.cpp ublas_interop/test53.cpp no_eh_support ;
821 run ublas_interop/test6.cpp ublas_interop/test62.cpp ublas_interop/test63.cpp no_eh_support ;
822 #run ublas_interop/test7.cpp ublas_interop/test71.cpp ublas_interop/test72.cpp ublas_interop/test73.cpp ;
824 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 ;
825 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 ;
826 #run ublas_interop/test3.cpp ublas_interop/test31.cpp ublas_interop/test32.cpp ublas_interop/test33.cpp : : : <define>TEST_ET=1 : ublas3_et ;
827 run ublas_interop/test4.cpp ublas_interop/test42.cpp ublas_interop/test43.cpp no_eh_support : : : <define>TEST_ET=1 : ublas3_et ;
828 run ublas_interop/test5.cpp ublas_interop/test52.cpp ublas_interop/test53.cpp no_eh_support : : : <define>TEST_ET=1 : ublas4_et ;
829 run ublas_interop/test6.cpp ublas_interop/test62.cpp ublas_interop/test63.cpp no_eh_support : : : <define>TEST_ET=1 : ublas5_et ;
830 #run ublas_interop/test7.cpp ublas_interop/test71.cpp ublas_interop/test72.cpp ublas_interop/test73.cpp : : : <define>TEST_ET=1 : ublas6_et ;
833 # Serialization tests, run in release mode so we cycle through more values:
835 path-constant here : . ;
836 run test_cpp_int_serial.cpp ../../serialization/build//boost_serialization : : : release <define>TEST1 <toolset>gcc-mingw:<link>static : test_cpp_int_serial_1 ;
837 run test_cpp_int_serial.cpp ../../serialization/build//boost_serialization : : : release <define>TEST2 <toolset>gcc-mingw:<link>static : test_cpp_int_serial_2 ;
838 run test_cpp_int_serial.cpp ../../serialization/build//boost_serialization : : : release <define>TEST3 <toolset>gcc-mingw:<link>static : test_cpp_int_serial_3 ;
839 run test_cpp_int_serial.cpp ../../serialization/build//boost_serialization : : : release <define>TEST4 <toolset>gcc-mingw:<link>static : test_cpp_int_serial_4 ;
840 run test_cpp_int_deserial.cpp ../../serialization/build//boost_serialization ../../filesystem/build//boost_filesystem : $(here) : : release <toolset>gcc-mingw:<link>static ;
841 run test_cpp_rat_serial.cpp ../../serialization/build//boost_serialization : : : release <toolset>gcc-mingw:<link>static ;
842 run test_adapt_serial.cpp ../../serialization/build//boost_serialization : : : release <toolset>gcc-mingw:<link>static ;
843 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 ;
844 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 ;
845 run test_float128_serial.cpp ../../serialization/build//boost_serialization quadmath : : : release <toolset>gcc-mingw:<link>static [ check-target-builds ../config//has_float128 : : <build>no ] ;
846 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 ;
847 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 ;
850 # Mixed mode comparison tests, see: https://svn.boost.org/trac/boost/ticket/11328
852 run test_checked_mixed_cpp_int.cpp no_eh_support ;
853 run test_mixed_cpp_bin_float.cpp no_eh_support ;
854 run test_mixed_cpp_dec_float.cpp no_eh_support ;
855 run test_mixed_mpf_float.cpp gmp no_eh_support : : : [ check-target-builds ../config//has_gmp : : <build>no ] ;
856 run test_mixed_mpfr_float.cpp mpfr gmp no_eh_support : : : [ check-target-builds ../config//has_mpfr : : <build>no ] ;
858 # Check for narrowing conversions:
860 run test_float_conversions.cpp no_eh_support ;
862 # specific bug cases:
864 compile bug11922.cpp ;
865 run bug12039.cpp no_eh_support ;
866 run test_hash.cpp : : :
867 [ check-target-builds ../config//has_float128 : <define>TEST_FLOAT128 <source>quadmath : ]
868 [ check-target-builds ../config//has_gmp : <define>TEST_GMP <source>gmp : ]
869 [ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <source>gmp <source>mpfr : ]
870 [ check-target-builds ../config//has_mpfi : <define>TEST_MPFI <source>gmp <source>mpfr <source>mpfi : ]
871 [ check-target-builds ../config//has_tommath : <define>TEST_TOMMATH <source>tommath : ]
877 for local source in [ glob math/*.cpp ]
879 run $(source) mpfr gmp
880 /boost/test//boost_unit_test_framework/<link>static
881 /boost/regex//boost_regex/<link>static
882 math/instances//test_instances_mpfr/<link>static
886 [ check-target-builds ../config//has_mpfr : : <build>no ]
889 <define>BOOST_ALL_NO_LIB
890 <define>BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
891 <toolset>msvc:<cxxflags>-bigobj
892 <include>../../math/include_private
896 /boost/test//boost_unit_test_framework/<link>static
897 /boost/regex//boost_regex/<link>static
898 math/instances//test_instances_mpf/<link>static
902 [ check-target-builds ../config//has_gmp : : <build>no ]
905 <define>BOOST_ALL_NO_LIB
906 <define>BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
907 <toolset>msvc:<cxxflags>-bigobj
908 <include>../../math/include_private
911 run $(source) /boost/test//boost_unit_test_framework/<link>static
912 /boost/regex//boost_regex/<link>static
913 math/instances//test_instances_cpp_dec_float/<link>static
917 <define>TEST_CPP_DEC_FLOAT
918 <define>BOOST_ALL_NO_LIB
919 <define>BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
921 <toolset>msvc:<cxxflags>-bigobj
922 <include>../../math/include_private
924 : $(source:B)_cpp_dec_float ;
925 run $(source) /boost/test//boost_unit_test_framework/<link>static
926 /boost/regex//boost_regex/<link>static
927 math/instances//test_instances_cpp_bin_float/<link>static
931 <define>TEST_CPP_BIN_FLOAT
932 <define>BOOST_ALL_NO_LIB
933 <define>BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
935 <toolset>msvc:<cxxflags>-bigobj
936 <include>../../math/include_private
938 : $(source:B)_cpp_bin_float ;
939 run $(source) quadmath
940 /boost/test//boost_unit_test_framework/<link>static
941 /boost/regex//boost_regex/<link>static
942 math/instances//test_instances_float128/<link>static
946 [ check-target-builds ../config//has_float128 : : <build>no ]
948 <define>TEST_FLOAT128
949 <define>BOOST_ALL_NO_LIB
950 <define>BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
951 <toolset>msvc:<cxxflags>-bigobj
952 <include>../../math/include_private
954 : $(source:B)_float128 ;
956 /boost/test//boost_unit_test_framework/<link>static
957 /boost/regex//boost_regex/<link>static
958 math/instances//test_instances_intel_quad/<link>static
962 [ check-target-builds ../config//has_intel_quad : <cxxflags>-Qoption,cpp,--extended_float_type : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ]
964 <define>TEST_FLOAT128
965 <define>BOOST_ALL_NO_LIB
966 <define>BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
967 <toolset>msvc:<cxxflags>-bigobj
968 <include>../../math/include_private
970 : $(source:B)_intel_quad ;
973 # High precision tests are rather different, as they test only one
974 # multiprecision type and are more a test of Boost.Math:
976 for local source in [ glob math/high_prec/*.cpp ]
979 /boost/test//boost_unit_test_framework/<link>static
980 /boost/regex//boost_regex/<link>static
985 <define>BOOST_ALL_NO_LIB
986 <define>BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
987 <toolset>msvc:<cxxflags>-bigobj
988 [ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <source>gmp <source>mpfr : ]
989 <include>../../math/include_private
994 local compile_fail_tests ;
996 for local source in [ glob compile_fail/*.cpp ]
998 compile_fail_tests += $(source:B) ;
999 compile-fail $(source)
1001 [ check-target-builds ../config//has_gmp : <define>TEST_GMP <debug-symbols>off : ]
1002 [ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <debug-symbols>off : ]
1006 alias compile_fail : $(compile_fail_tests) ;
1008 if ! $(disable-concepts)
1011 for local source in [ glob concepts/*.cpp ]
1014 compile $(source) mpfr
1016 <define>TEST_MPFR_50
1017 [ check-target-builds ../config//has_mpfr : : <build>no ]
1019 : $(source:B)_mpfr_50 ;
1021 compile $(source) mpfr
1024 [ check-target-builds ../config//has_mpfr : : <build>no ]
1026 : $(source:B)_mpfr_6 ;
1028 compile $(source) mpfr
1030 <define>TEST_MPFR_15
1031 [ check-target-builds ../config//has_mpfr : : <build>no ]
1033 : $(source:B)_mpfr_15 ;
1035 compile $(source) mpfr
1037 <define>TEST_MPFR_17
1038 [ check-target-builds ../config//has_mpfr : : <build>no ]
1040 : $(source:B)_mpfr_17 ;
1042 compile $(source) mpfr
1044 <define>TEST_MPFR_30
1045 [ check-target-builds ../config//has_mpfr : : <build>no ]
1047 : $(source:B)_mpfr_30 ;
1049 compile $(source) gmp
1052 [ check-target-builds ../config//has_gmp : : <build>no ]
1054 : $(source:B)_mpf50 ;
1058 <define>TEST_CPP_DEC_FLOAT
1060 : $(source:B)_cpp_dec_float ;
1064 <define>TEST_CPP_BIN_FLOAT
1066 : $(source:B)_cpp_bin_float ;
1070 <define>TEST_CPP_DEC_FLOAT_NO_ET
1072 : $(source:B)_cpp_dec_float_no_et ;
1076 <define>TEST_BACKEND
1078 : $(source:B)_backend_concept ;
1082 <define>TEST_LOGGED_ADAPTER
1084 : $(source:B)_logged_adaptor ;
1088 alias arithmetic_tests :
1089 test_arithmetic_backend_concept
1090 test_arithmetic_cpp_dec_float_1
1091 test_arithmetic_cpp_dec_float_2
1092 test_arithmetic_cpp_dec_float_3
1093 test_arithmetic_cpp_bin_float_1
1094 test_arithmetic_cpp_bin_float_2
1095 test_arithmetic_cpp_bin_float_3
1096 test_arithmetic_mpf_50
1099 test_arithmetic_mpz_rat
1100 test_arithmetic_mpz_br
1102 test_arithmetic_mpfr
1103 test_arithmetic_mpfr_50
1104 test_arithmetic_mpfr_50_static
1105 test_arithmetic_tommath
1106 test_arithmetic_tommath_rat
1107 test_arithmetic_tommath_br
1108 test_arithmetic_cpp_int_1
1109 test_arithmetic_cpp_int_2
1110 test_arithmetic_cpp_int_3
1111 test_arithmetic_cpp_int_4
1112 test_arithmetic_cpp_int_5
1113 test_arithmetic_cpp_int_6
1114 test_arithmetic_cpp_int_7
1115 test_arithmetic_cpp_int_8
1116 test_arithmetic_cpp_int_9
1117 test_arithmetic_cpp_int_10
1118 test_arithmetic_cpp_int_11
1119 test_arithmetic_cpp_int_12
1120 test_arithmetic_cpp_int_13
1121 test_arithmetic_cpp_int_14
1122 test_arithmetic_cpp_int_15
1123 test_arithmetic_cpp_int_16
1124 test_arithmetic_cpp_int_17
1125 test_arithmetic_cpp_int_18
1126 test_arithmetic_cpp_int_br
1127 test_arithmetic_ab_1
1128 test_arithmetic_ab_2
1129 test_arithmetic_ab_3
1130 test_cpp_dec_float_round
1131 test_arithmetic_logged_1
1132 test_arithmetic_logged_2
1133 test_arithmetic_dbg_adptr1
1134 test_arithmetic_dbg_adptr2
1135 test_arithmetic_mpfi_50
1136 test_arithmetic_float_128
1137 test_arithmetic_float_128
1140 alias cpp_int_tests :
1141 test_cpp_int_left_shift
1147 test_checked_cpp_int
1148 test_unchecked_cpp_int
1150 test_cpp_int_serial_1
1151 test_cpp_int_serial_2
1152 test_cpp_int_serial_3
1153 test_cpp_int_serial_4
1154 test_cpp_int_deserial
1157 alias functions_and_limits :
1158 test_numeric_limits_backend_concept
1159 test_numeric_limits_mpf50
1160 test_numeric_limits_mpf
1161 test_numeric_limits_mpz
1162 test_numeric_limits_mpq
1163 test_numeric_limits_mpfr
1164 test_numeric_limits_mpfr_50
1165 test_numeric_limits_cpp_dec_float
1166 test_numeric_limits_cpp_bin_float
1167 test_numeric_limits_tommath
1168 test_numeric_limits_cpp_int
1169 test_numeric_limits_mpfi_50
1170 test_numeric_limits_float128
1186 test_fpclassify_mpf50
1187 test_sf_import_c99_mpf50
1203 test_fpclassify_mpfr50
1204 test_sf_import_c99_mpfr50
1220 test_fpclassify_mpfi50
1221 test_sf_import_c99_mpfi50
1223 test_exp_cpp_dec_float
1224 test_log_cpp_dec_float
1225 test_pow_cpp_dec_float
1226 test_sinh_cpp_dec_float
1227 test_sqrt_cpp_dec_float
1228 test_cosh_cpp_dec_float
1229 test_tanh_cpp_dec_float
1230 test_sin_cpp_dec_float
1231 test_cos_cpp_dec_float
1232 test_tan_cpp_dec_float
1233 test_asin_cpp_dec_float
1234 test_acos_cpp_dec_float
1235 test_atan_cpp_dec_float
1236 test_round_cpp_dec_float
1237 test_fpclassify_cpp_dec_float
1238 test_sf_import_c99_cpp_dec_float
1239 test_sf_import_c99_cpp_dec_float_2
1240 test_sf_import_c99_cpp_dec_float_3
1241 test_sf_import_c99_cpp_dec_float_4
1242 test_sf_import_c99_cpp_dec_float_5
1244 test_exp_cpp_bin_float
1245 test_log_cpp_bin_float
1246 test_pow_cpp_bin_float
1247 test_sinh_cpp_bin_float
1248 test_sqrt_cpp_bin_float
1249 test_cosh_cpp_bin_float
1250 test_tanh_cpp_bin_float
1251 test_sin_cpp_bin_float
1252 test_cos_cpp_bin_float
1253 test_tan_cpp_bin_float
1254 test_asin_cpp_bin_float
1255 test_acos_cpp_bin_float
1256 test_atan_cpp_bin_float
1257 test_round_cpp_bin_float
1258 test_fpclassify_cpp_bin_float
1259 test_sf_import_c99_cpp_bin_float
1275 test_fpclassify_float128
1276 test_sf_import_c99_float128
1281 test_sinh_intel_quad
1282 test_sqrt_intel_quad
1283 test_cosh_intel_quad
1284 test_tanh_intel_quad
1288 test_asin_intel_quad
1289 test_acos_intel_quad
1290 test_atan_intel_quad
1291 test_round_intel_quad
1292 test_fpclassify_intel_quad
1293 test_sf_import_c99_intel_quad
1300 test_cpp_bin_float_io_1
1301 test_cpp_bin_float_io_2
1305 test_gmp_conversions
1306 test_mpfr_conversions
1307 test_constants_mpf50
1308 test_constants_mpfr_50
1309 test_constants_cpp_dec_float
1310 test_convert_from_cpp_int
1311 test_convert_from_mpz_int
1312 test_convert_from_tom_int
1313 test_convert_from_cpp_rational
1314 test_convert_from_gmp_rational
1315 test_convert_from_tom_rational
1316 test_convert_from_cpp_bin_float
1317 test_convert_from_cpp_dec_float
1318 test_convert_from_mpf_float
1319 test_convert_from_mpfr_float
1320 test_convert_from_mpfi_float
1321 test_convert_from_float128
1322 test_float_io_cpp_dec_float
1326 test_float_io_float128
1327 test_float_io_intel_quad
1331 test_rational_io_tommath
1332 test_rational_io_mpz
1333 test_rational_io_cpp_int
1335 test_rat_float_interconv_1
1336 test_rat_float_interconv_2
1337 test_rat_float_interconv_3
1338 test_rat_float_interconv_4
1339 test_rat_float_interconv_5
1340 test_rat_float_interconv_6
1341 test_rat_float_interconv_7
1342 test_rat_float_interconv_8
1344 test_cpp_int_import_export
1354 test_nothrow_cpp_int
1355 test_nothrow_cpp_rational
1356 test_nothrow_cpp_bin_float
1357 test_nothrow_cpp_dec_float
1358 test_nothrow_float128
1363 tommath_include_test
1364 cpp_int_include_test
1365 cpp_dec_float_include_test
1366 cpp_bin_float_include_test
1378 test_cpp_dec_float_serial_1
1379 test_cpp_dec_float_serial_2
1380 test_float128_serial
1381 test_bin_dec_float_serial_1
1382 test_bin_dec_float_serial_2
1383 test_checked_mixed_cpp_int
1384 test_mixed_cpp_bin_float
1385 test_mixed_cpp_dec_float
1386 test_mixed_mpf_float
1387 test_mixed_mpfr_float
1388 test_float_conversions