Jamfile.v2 90.4 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649
# copyright John Maddock 2011
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt.

import testing ;
import modules ;
import path ;
import ../../config/checks/config : requires ;

local ntl-path = [ modules.peek : NTL_PATH ] ;
local gmp_path = [ modules.peek : GMP_PATH ] ;
local mpfr_path = [ modules.peek : MPFR_PATH ] ;
local mpfi_path = [ modules.peek : MPFI_PATH ] ;
local tommath_path = [ modules.peek : TOMMATH_PATH ] ;


#######################################################################################
#
#  NOTE: Because these tests take a fair while to build and run, they are split up into
#        multiple smaller test suites which are:
#
#        arithmetic_tests
#        functions_and_limits
#        conversions
#        cpp_int_tests
#        misc
#        specfun
#        compile_fail
#        concepts
#        examples
#        
#        You can run an individual suite by passing its name to b2 on the command line.
#        Or you can run all except the "specfun" tests (which are very slow) by not specifying anything.
#
#        Please make sure that any new tests are added to one of the test suites, and that the
#        build times for the various suites are reasonably balanced: otherwise the CI builds
#        will time out if one suite contains too many.
#
#######################################################################################################

path-constant here : . ;

project : requirements
   <include>$(gmp_path)
   <include>$(gmp_path)/mpfr
   <include>$(gmp_path)/gmpfrxx
   <include>$(mpfr_path)
   <include>$(mpfi_path)
   <include>$(mpfi_path)/src
   <include>$(tommath_path)
   <include>../include
   <include>../../..
   # We set these to make it easier to set up and test GMP and MPFR under Win32:
   <toolset>msvc:<runtime-link>static
   <toolset>msvc:<link>static
   <toolset>msvc:<warnings>all
   <toolset>msvc:<cxxflags>/fp\:precise
   <toolset>intel-win:<runtime-link>static
   <toolset>intel-win:<link>static
   <toolset>clang-win:<link>static  # Clang-win does not generate .dlls.
   <toolset>clang:<link>static # Clang-linux does not generate .dlls.
   <toolset>clang:<cxxflags>-Wno-unused-variable  # warning: unused variable 'tolerance' [-Wunused-variable]
   <toolset>clang:<cxxflags>-v
  
   # Assembler error "File too big" caused by lots of C++ templates, for example, math/floating_point_examples.cpp.
   # Some projects on some toolsets may require
   #   <toolset>gcc-mingw:<cxxflags>\"-Wa,-mbig-obj\"
   # See https://digitalkarabela.com/mingw-w64-how-to-fix-file-too-big-too-many-sections/
   # <toolset>gcc-mingw:<cxxflags>-Wa,-mbig-obj # Some projects may overflow assembler and require equivalent of MSVC /bigobj.
   # Requires version 2.30 of GNU binutils.
   # Best applied only to projects that require this, see multiprecision/example  run math/floating_point_examples.cpp.
   
   # Speed up compiles:
   <toolset>msvc:<debug-symbols>off
   <toolset>intel:<debug-symbols>off
   <toolset>gcc:<cxxflags>-Wall
   <toolset>gcc:<cxxflags>-Wextra
   #<toolset>intel:<define>SLOW_COMPILER
   <toolset>msvc,<optimization>off:<cxxflags>-RTC1
   # We can't yet enable this - it breaks the STL in some tests...
   #<toolset>msvc,<optimization>off:<cxxflags>-RTCc
   #<toolset>msvc,<optimization>off:<define>_ALLOW_RTCc_IN_STL
   [ requires  
      cxx11_rvalue_references cxx11_template_aliases cxx11_hdr_array cxx11_allocator cxx11_constexpr cxx11_explicit_conversion_operators cxx11_ref_qualifiers
      cxx11_hdr_functional cxx11_variadic_templates cxx11_user_defined_literals cxx11_decltype cxx11_static_assert cxx11_defaulted_functions
      cxx11_noexcept cxx11_ref_qualifiers cxx11_user_defined_literals cxx11_hdr_type_traits
      ]
   ;

local enable-specfun = [ MATCH (--enable-specfun) : [ modules.peek : ARGV ] ] ;
local disable-concepts = [ MATCH (--disable-concepts) : [ modules.peek : ARGV ] ] ;

lib gmp : : <search>$(gmp_path) ;
lib mpfr : : <search>$(gmp_path) <search>$(mpfr_path) <search>$(mpfr_path)/build.vc10/lib/Win32/Debug ;
lib mpfi : : <search>$(gmp_path) <search>$(mpfr_path) <search>$(mpfr_path)/build.vc10/lib/Win32/Debug <search>$(mpfi_path) <search>$(mpfi_path)/src ;
lib quadmath ;
lib mpc ;

if $(tommath_path)
{
   lib tommath : [ GLOB $(tommath_path) : *.c ] : <visibility>global ;
   TOMMATH = tommath ;
}
else
{
   lib tommath : : <search>$(tommath_path) ;
   TOMMATH = tommath ;
}

lib no_eh_support : no_eh_test_support.cpp ;

test-suite arithmetic_tests :

   [ run test_arithmetic_backend_concept.cpp no_eh_support ]
   [ compile test_arithmetic_skeleton.cpp ]

   [ run test_arithmetic_cpp_dec_float_1.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_dec_float_2.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_dec_float_3.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_dec_float_3m.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]

   [ run test_arithmetic_cpp_bin_float_1.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_bin_float_2.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_bin_float_2m.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_bin_float_3.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_bin_float_4.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_bin_float_5.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]

   [ run test_arithmetic_mpf_50.cpp gmp no_eh_support : : : [ check-target-builds ../config//has_gmp : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_mpf.cpp gmp no_eh_support : : : [ check-target-builds ../config//has_gmp : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_mpz.cpp gmp no_eh_support : : : [ check-target-builds ../config//has_gmp : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_mpz_rat.cpp gmp no_eh_support : : : [ check-target-builds ../config//has_gmp : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_mpz_br.cpp gmp no_eh_support : : : [ check-target-builds ../config//has_gmp : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_mpq.cpp gmp no_eh_support : : : [ check-target-builds ../config//has_gmp : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]

   [ run test_arithmetic_mpfr.cpp mpfr gmp no_eh_support : : : [ check-target-builds ../config//has_mpfr : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_mpfr_50.cpp mpfr gmp no_eh_support : : : [ check-target-builds ../config//has_mpfr : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_mpfr_50_static.cpp mpfr gmp no_eh_support : : : [ check-target-builds ../config//has_mpfr : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]

   [ run test_arithmetic_tommath.cpp $(TOMMATH) no_eh_support : : : [ check-target-builds ../config//has_tommath : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_tommath_rat.cpp $(TOMMATH) no_eh_support : : : [ check-target-builds ../config//has_tommath : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_tommath_br.cpp $(TOMMATH) no_eh_support : : : [ check-target-builds ../config//has_tommath : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]

   [ run test_arithmetic_cpp_int_1.cpp no_eh_support : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_int_2.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_int_3.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_int_4.cpp no_eh_support : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_int_5.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_int_6.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_int_7.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_int_8.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_int_9.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_int_10.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_int_11.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_int_12.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_int_13.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_int_14.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_int_15.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_int_16.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_int_17.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_int_18.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_int_19.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_int_20.cpp no_eh_support : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_int_21.cpp no_eh_support : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_int_22.cpp no_eh_support : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_int_23.cpp no_eh_support : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_int_br.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]

   [ run test_arithmetic_ab_1.cpp no_eh_support : : : [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_ab_2.cpp no_eh_support : : : [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_ab_3.cpp no_eh_support : : : [ check-target-builds ../config//has_float128 : <source>quadmath ] ]

   [ run test_cpp_dec_float_round.cpp no_eh_support ]

   [ run test_arithmetic_logged_1.cpp no_eh_support : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_logged_2.cpp no_eh_support : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]

   [ run test_arithmetic_dbg_adptr1.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_dbg_adptr1m.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_dbg_adptr2.cpp no_eh_support : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]

   [ run test_arithmetic_cpp_complex_dbg_adptr.cpp : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_int_dbg_adptr.cpp : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_rat_dbg_adptr.cpp : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_mpf_dbg_adptr.cpp gmp : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_gmp : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_mpc_dbg_adptr.cpp mpc mpfr gmp : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_mpc : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_mpfi_dbg_adptr.cpp mpfi mpfr gmp : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_mpfi : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_mpfr_dbg_adptr.cpp mpfr gmp : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_mpfr : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_mpq_dbg_adptr.cpp gmp : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_gmp : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_mpz_dbg_adptr.cpp gmp : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_gmp : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]

   [ run test_arithmetic_cpp_complex_logged_adptr.cpp : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_int_logged_adptr.cpp : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_cpp_rat_logged_adptr.cpp : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_mpf_logged_adptr.cpp gmp : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_gmp : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_mpc_logged_adptr.cpp mpc mpfr gmp : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_mpc : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_mpfi_logged_adptr.cpp mpfi mpfr gmp : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_mpfi : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_mpfr_logged_adptr.cpp mpfr gmp : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_mpfr : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_mpq_logged_adptr.cpp gmp : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_gmp : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_mpz_logged_adptr.cpp gmp : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_gmp : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]

   [ run test_arithmetic_mpfi_50.cpp mpfi mpfr gmp no_eh_support : : : [ check-target-builds ../config//has_mpfi : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]

   [ run test_arithmetic_float_128.cpp quadmath no_eh_support : : : [ check-target-builds ../config//has_float128 : : <build>no ] ]
   [ 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 ]

   [ run test_arithmetic_mpc.cpp mpc mpfr gmp : : : [ check-target-builds ../config//has_mpc : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_mpfr_mpc_precisions.cpp mpc mpfr gmp : : : [ check-target-builds ../config//has_mpc : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_mpfi_precisions.cpp mpfi mpfr gmp : : : [ check-target-builds ../config//has_mpfi : : <build>no ] ]
   [ run test_mpf_precisions.cpp gmp : : : [ check-target-builds ../config//has_gmp : : <build>no ] ]
   [ run test_threaded_precision.cpp mpfr gmp : : : [ check-target-builds ../config//has_mpfr : : <build>no ] <define>TEST_MPF_50 : test_threaded_precision_mpf ]
   [ 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 ] ]
   [ run test_arithmetic_complex_adaptor.cpp : : : [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_complex_adaptor_2.cpp : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
   [ run test_arithmetic_complex128.cpp : : : [ check-target-builds ../config//has_float128 : <source>quadmath ] ]

   [ run test_signed_zero.cpp : : : <define>TEST_CPP_BIN_FLOAT [ requires cxx17_if_constexpr ] : test_signed_zero_cpp_bin_float ]
   [ run test_signed_zero.cpp mpfr gmp : : : <define>TEST_MPFR [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_mpfr : : <build>no ] : test_signed_zero_mpfr ]

   [ run test_complex_signed_zero.cpp : : : <define>TEST_CPP_BIN_FLOAT [ requires cxx17_if_constexpr ] : test_complex_signed_zero_cpp_bin_float ]
   [ run test_complex_signed_zero.cpp mpc mpfr gmp : : : <define>TEST_MPC [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_mpc : : <build>no ] : test_complex_signed_zero_mpc ]

   [ run test_preserve_source_precision.cpp gmp : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_gmp : : <build>no ] <define>TEST_MPF : test_preserve_source_precision_gmp ]
   [ run test_preserve_source_precision.cpp gmp mpfr : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_mpfr : : <build>no ] <define>TEST_MPFR  : test_preserve_source_precision_mpfr ]
   [ run test_preserve_source_precision.cpp gmp mpfr mpc : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_mpc : : <build>no ] <define>TEST_MPC : test_preserve_source_precision_mpc ]
   [ run test_preserve_source_precision.cpp gmp mpfr mpfi : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_mpfi : : <build>no ] <define>TEST_MPFI : test_preserve_source_precision_mpfi ]
   [ run test_preserve_component_precision.cpp gmp : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_gmp : : <build>no ] <define>TEST_MPF : test_preserve_component_precision_gmp ]
   [ run test_preserve_component_precision.cpp gmp mpfr : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_mpfr : : <build>no ] <define>TEST_MPFR  : test_preserve_component_precision_mpfr ]
   [ run test_preserve_component_precision.cpp gmp mpfr mpc : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_mpc : : <build>no ] <define>TEST_MPC : test_preserve_component_precision_mpc ]
   [ run test_preserve_component_precision.cpp gmp mpfr mpfi : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_mpfi : : <build>no ] <define>TEST_MPFI : test_preserve_component_precision_mpfi ]
   [ run test_preserve_related_precision.cpp gmp : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_gmp : : <build>no ] <define>TEST_MPF : test_preserve_related_precision_gmp ]
   [ run test_preserve_related_precision.cpp gmp mpfr : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_mpfr : : <build>no ] <define>TEST_MPFR  : test_preserve_related_precision_mpfr ]
   [ run test_preserve_related_precision.cpp gmp mpfr mpc : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_mpc : : <build>no ] <define>TEST_MPC : test_preserve_related_precision_mpc ]
   [ run test_preserve_related_precision.cpp gmp mpfr mpfi : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_mpfi : : <build>no ] <define>TEST_MPFI : test_preserve_related_precision_mpfi ]
   [ run test_preserve_all_precision.cpp gmp : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_gmp : : <build>no ] <define>TEST_MPF : test_preserve_all_precision_gmp ]
   [ run test_preserve_all_precision.cpp gmp mpfr : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_mpfr : : <build>no ] <define>TEST_MPFR  : test_preserve_all_precision_mpfr ]
   [ run test_preserve_all_precision.cpp gmp mpfr mpc : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_mpc : : <build>no ] <define>TEST_MPC : test_preserve_all_precision_mpc ]
   [ run test_preserve_all_precision.cpp gmp mpfr mpfi : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_mpfi : : <build>no ] <define>TEST_MPFI : test_preserve_all_precision_mpfi ]
   [ run test_preserve_target_precision.cpp gmp : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_gmp : : <build>no ] <define>TEST_MPF : test_preserve_target_precision_gmp ]
   [ run test_preserve_target_precision.cpp gmp mpfr : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_mpfr : : <build>no ] <define>TEST_MPFR : test_preserve_target_precision_mpfr ]
   [ run test_preserve_target_precision.cpp gmp mpfr mpc : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_mpc : : <build>no ] <define>TEST_MPC : test_preserve_target_precision_mpc ]
   [ run test_preserve_target_precision.cpp gmp mpfr mpfi : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_mpfi : : <build>no ] <define>TEST_MPFI : test_preserve_target_precision_mpfi ]
   [ run test_assume_uniform_precision.cpp gmp : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_gmp : : <build>no ] <define>TEST_MPF : test_assume_uniform_precision_gmp ]
   [ run test_assume_uniform_precision.cpp gmp mpfr : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_mpfr : : <build>no ] <define>TEST_MPFR : test_assume_uniform_precision_mpfr ]
   [ run test_assume_uniform_precision.cpp gmp mpfr mpc : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_mpc : : <build>no ] <define>TEST_MPC : test_assume_uniform_precision_mpc ]
   [ run test_assume_uniform_precision.cpp gmp mpfr mpfi : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_mpfi : : <build>no ] <define>TEST_MPFI : test_assume_uniform_precision_mpfi ]

;

alias precision_tests : test_preserve_source_precision_gmp test_preserve_source_precision_mpfr test_preserve_source_precision_mpc test_preserve_source_precision_mpfi 
   test_preserve_component_precision_gmp test_preserve_component_precision_mpfr test_preserve_component_precision_mpc test_preserve_component_precision_mpfi 
   test_preserve_related_precision_gmp test_preserve_related_precision_mpfr test_preserve_related_precision_mpc test_preserve_related_precision_mpfi 
   test_preserve_all_precision_gmp test_preserve_all_precision_mpfr test_preserve_all_precision_mpc test_preserve_all_precision_mpfi 
   test_preserve_target_precision_gmp test_preserve_target_precision_mpfr test_preserve_target_precision_mpc test_preserve_target_precision_mpfi 
   test_assume_uniform_precision_gmp test_assume_uniform_precision_mpfr test_assume_uniform_precision_mpc test_assume_uniform_precision_mpfi 
   test_mpfr_mpc_precisions test_mpfi_precisions test_mpf_precisions test_threaded_precision_mpf ;

rule get_function_tests
{
   local result ;
   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
   {
         result += [ run $(source) gmp no_eh_support
              : # command line
              : # input files
              : # requirements
               [ check-target-builds ../config//has_gmp : : <build>no ]
               <define>TEST_MPF_50
              : $(source:B)_mpf50 ] ;
         result += [ run $(source) mpfr gmp no_eh_support
              : # command line
              : # input files
              : # requirements
               [ check-target-builds ../config//has_mpfr : : <build>no ]
               <define>TEST_MPFR_50
              : $(source:B)_mpfr50 ] ;
         result += [ run $(source) mpfi mpfr gmp no_eh_support
              : # command line
              : # input files
              : # requirements
               [ check-target-builds ../config//has_mpfi : : <build>no ]
               <define>TEST_MPFI_50
              : $(source:B)_mpfi50 ] ;
         result += [ run $(source) no_eh_support
              : # command line
              : # input files
              : # requirements
               <define>TEST_CPP_DEC_FLOAT
              : $(source:B)_cpp_dec_float ] ;
         result += [ run $(source) no_eh_support
              : # command line
              : # input files
              : # requirements
               <define>TEST_CPP_BIN_FLOAT
              : $(source:B)_cpp_bin_float ] ;
         result += [ run $(source) quadmath no_eh_support
              : # command line
              : # input files
              : # requirements
               [ check-target-builds ../config//has_float128 : : <build>no ]
               <define>TEST_FLOAT128
              : $(source:B)_float128 ] ;
         result += [ run $(source) no_eh_support
              : # command line
              : # input files
              : # requirements
               [ check-target-builds ../config//has_intel_quad : <cxxflags>-Qoption,cpp,--extended_float_type : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ]
               <define>TEST_FLOAT128
              : $(source:B)_intel_quad ] ;
   }
   return $(result) ;
}

test-suite functions_and_limits :

      [ run test_numeric_limits.cpp no_eh_support
              : # command line
              : # input files
              : # requirements
              <define>TEST_BACKEND
              : test_numeric_limits_backend_concept ]

      [ run test_numeric_limits.cpp gmp no_eh_support
              : # command line
              : # input files
              : # requirements
              <define>TEST_MPF_50 <define>PRINT_MAX_DIGITS10
               [ check-target-builds ../config//has_gmp : : <build>no ]
              : test_numeric_limits_mpf50 ]

      [ run test_numeric_limits.cpp gmp no_eh_support
              : # command line
              : # input files
              : # requirements
              <define>TEST_MPF <define>PRINT_MAX_DIGITS10
               [ check-target-builds ../config//has_gmp : : <build>no ]
              : test_numeric_limits_mpf ]

      [ run test_numeric_limits.cpp gmp no_eh_support
              : # command line
              : # input files
              : # requirements
              <define>TEST_MPZ
               [ check-target-builds ../config//has_gmp : : <build>no ]
              : test_numeric_limits_mpz ]

      [ run test_numeric_limits.cpp gmp no_eh_support
              : # command line
              : # input files
              : # requirements
              <define>TEST_MPQ
               [ check-target-builds ../config//has_gmp : : <build>no ]
              : test_numeric_limits_mpq ]

      [ run test_numeric_limits.cpp mpfr gmp no_eh_support
              : # command line
              : # input files
              : # requirements
              <define>TEST_MPFR <define>PRINT_MAX_DIGITS10
               [ check-target-builds ../config//has_mpfr : : <build>no ]
              : test_numeric_limits_mpfr ]

      [ run test_numeric_limits.cpp mpfr gmp no_eh_support
              : # command line
              : # input files
              : # requirements
              <define>TEST_MPFR_50 <define>PRINT_MAX_DIGITS10
               [ check-target-builds ../config//has_mpfr : : <build>no ]
              : test_numeric_limits_mpfr_50 ]

      [ run test_numeric_limits.cpp no_eh_support
              : # command line
              : # input files
              : # requirements
              <define>TEST_CPP_DEC_FLOAT
              : test_numeric_limits_cpp_dec_float ]

      [ run test_numeric_limits.cpp no_eh_support
              : # command line
              : # input files
              : # requirements
              <define>TEST_CPP_BIN_FLOAT <define>PRINT_MAX_DIGITS10
              : test_numeric_limits_cpp_bin_float ]

      [ run test_numeric_limits.cpp $(TOMMATH) no_eh_support
              : # command line
              : # input files
              : # requirements
              <define>TEST_TOMMATH
               [ check-target-builds ../config//has_tommath : : <build>no ]
              : test_numeric_limits_tommath ]

      [ run test_numeric_limits.cpp no_eh_support
              : # command line
              : # input files
              : # requirements
              <define>TEST_CPP_INT
              : test_numeric_limits_cpp_int ]

      [ run test_numeric_limits.cpp mpfi mpfr gmp no_eh_support
              : # command line
              : # input files
              : # requirements
              <define>TEST_MPFI_50
               [ check-target-builds ../config//has_mpfi : : <build>no ]
              : test_numeric_limits_mpfi_50 ]

      [ run test_numeric_limits.cpp quadmath no_eh_support
              : # command line
              : # input files
              : # requirements
              <define>TEST_FLOAT128
               [ check-target-builds ../config//has_float128 : : <build>no ]
              : test_numeric_limits_float128 ]
      [ run test_numeric_limits.cpp no_eh_support
              : # command line
              : # input files
              : # requirements
              <define>TEST_FLOAT128
               [ check-target-builds ../config//has_intel_quad : <cxxflags>-Qoption,cpp,--extended_float_type : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ]
              : test_numeric_limits_intel_quad ]

      [ run test_sf_import_c99.cpp : : : <define>TEST_CPP_DEC_FLOAT_2 : test_sf_import_c99_cpp_dec_float_2 ]
      [ run test_sf_import_c99.cpp : : : <define>TEST_CPP_DEC_FLOAT_3 : test_sf_import_c99_cpp_dec_float_3 ]
      [ run test_sf_import_c99.cpp : : : <define>TEST_CPP_DEC_FLOAT_4 : test_sf_import_c99_cpp_dec_float_4 ]
      [ run test_sf_import_c99.cpp : : : <define>TEST_CPP_DEC_FLOAT_5 : test_sf_import_c99_cpp_dec_float_5 ]
      [ run test_sf_import_c99.cpp : : : <define>TEST_CPP_DEC_FLOAT_6 : test_sf_import_c99_cpp_dec_float_6 ]

      [ run test_sf_import_c99.cpp : : : <define>TEST_CPP_BIN_FLOAT_2 : test_sf_import_c99_cpp_bin_float_2 ]
      [ run test_sf_import_c99.cpp : : : <define>TEST_CPP_BIN_FLOAT_2 : test_sf_import_c99_cpp_bin_float_3 ]

      [ run test_sf_import_c99.cpp mpfi mpfr gmp : : : <define>TEST_MPFI_DEBUG_ADAPTOR [ check-target-builds ../config//has_mpfi : : <build>no ] : test_sf_import_c99_mpfi_debug_adptr  ]
      [ run test_sf_import_c99.cpp mpfr gmp : : : <define>TEST_MPFR_DEBUG_ADAPTOR [ check-target-builds ../config//has_mpfr : : <build>no ] : test_sf_import_c99_mpfr_debug_adptr  ]

      [ run test_sf_import_c99.cpp mpfi mpfr gmp : : : <define>TEST_MPFI_LOGGED_ADAPTOR [ check-target-builds ../config//has_mpfi : : <build>no ] : test_sf_import_c99_mpfi_logged_adptr  ]
      [ run test_sf_import_c99.cpp mpfr gmp : : : <define>TEST_MPFR_LOGGED_ADAPTOR [ check-target-builds ../config//has_mpfr : : <build>no ] : test_sf_import_c99_mpfr_logged_adptr  ]

      [ run test_move.cpp mpfr gmp no_eh_support
              : # command line
              : # input files
              : # requirements
              <define>TEST_MPFR
               [ check-target-builds ../config//has_mpfr : : <build>no ]
              : test_move_mpfr ]

      [ run test_move.cpp mpc mpfr gmp no_eh_support
              : # command line
              : # input files
              : # requirements
              <define>TEST_MPC
               [ check-target-builds ../config//has_mpc : : <build>no ]
              : test_move_mpc ]

      [ run test_move.cpp gmp no_eh_support
              : # command line
              : # input files
              : # requirements
              <define>TEST_GMP
               [ check-target-builds ../config//has_gmp : : <build>no ]
              : test_move_gmp ]

      [ run test_move.cpp $(TOMMATH) no_eh_support
              : # command line
              : # input files
              : # requirements
              <define>TEST_TOMMATH
               [ check-target-builds ../config//has_tommath : : <build>no ]
              : test_move_tommath ]

      [ run test_move.cpp no_eh_support
              : # command line
              : # input files
              : # requirements
              <define>TEST_CPP_INT
              : test_move_cpp_int ]

      [ run test_sin_near_half_pi.cpp mpfr gmp : : : <define>TEST_CPP_BIN_FLOAT release [ check-target-builds ../config//has_float128 : <source>quadmath : ] [ check-target-builds ../config//has_mpfr : : <build>no ] : test_sin_near_half_pi_cpp_bin_float ]
      [ run test_sin_near_half_pi.cpp mpfr gmp : : : <define>TEST_CPP_DEC_FLOAT release [ check-target-builds ../config//has_mpfr : : <build>no ] : test_sin_near_half_pi_cpp_dec_float ]
      [ run test_sin_near_half_pi.cpp mpfr gmp : : : <define>TEST_MPF_50 release [ check-target-builds ../config//has_mpfr : : <build>no ] : test_sin_near_half_pi_mpf_50 ]
      [ run test_sin_near_half_pi.cpp mpfr gmp : : : <define>TEST_MPFR_50 release [ check-target-builds ../config//has_mpfr : : <build>no ] : test_sin_near_half_pi_mpfr_50 ]
      [ run test_sin_near_half_pi.cpp mpfr gmp quadmath : : : <define>TEST_FLOAT128 release [ check-target-builds ../config//has_mpfr : : <build>no ] [ check-target-builds ../config//has_float128 : : <build>no ] : test_sin_near_half_pi_float128 ]
      [ run test_cos_near_half_pi.cpp mpfr gmp : : : <define>TEST_CPP_BIN_FLOAT release [ check-target-builds ../config//has_float128 : <source>quadmath : ] [ check-target-builds ../config//has_mpfr : : <build>no ] : test_cos_near_half_pi_cpp_bin_float ]
      [ run test_cos_near_half_pi.cpp mpfr gmp : : : <define>TEST_CPP_DEC_FLOAT release [ check-target-builds ../config//has_mpfr : : <build>no ] : test_cos_near_half_pi_cpp_dec_float ]
      [ run test_cos_near_half_pi.cpp mpfr gmp : : : <define>TEST_MPF_50 release [ check-target-builds ../config//has_mpfr : : <build>no ] : test_cos_near_half_pi_mpf_50 ]
      [ run test_cos_near_half_pi.cpp mpfr gmp : : : <define>TEST_MPFR_50 release [ check-target-builds ../config//has_mpfr : : <build>no ] : test_cos_near_half_pi_mpfr_50 ]
      [ run test_cos_near_half_pi.cpp mpfr gmp quadmath : : : <define>TEST_FLOAT128 release [ check-target-builds ../config//has_mpfr : : <build>no ] [ check-target-builds ../config//has_float128 : : <build>no ] : test_cos_near_half_pi_float128 ]

      [ run test_cpp_bin_float_tgamma.cpp ]
      [ run test_cpp_dec_float_tgamma.cpp ]

      [ run test_roots_10k_digits.cpp
              : # command line
              : # input files
              : # requirements
              <define>TEST_CPP_DEC_FLOAT
              : test_roots_10k_digits_cpp_dec_float ]

      [ run test_roots_10k_digits.cpp
              : # command line
              : # input files
              : # requirements
              <define>TEST_CPP_BIN_FLOAT
              : test_roots_10k_digits_cpp_bin_float ]

      [ get_function_tests ]
;

test-suite conversions :

   [ run test_gmp_conversions.cpp gmp no_eh_support
           : # command line
           : # input files
           : # requirements
            [ check-target-builds ../config//has_gmp : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath : ] ]

   [ run test_mpfr_conversions.cpp gmp mpfr no_eh_support
           : # command line
           : # input files
           : # requirements
            [ check-target-builds ../config//has_mpfr : : <build>no ] ]

   [ run test_mpc_conversions.cpp gmp mpfr mpc no_eh_support
           : # command line
           : # input files
           : # requirements
            [ check-target-builds ../config//has_mpc : : <build>no ] ]

   [ run test_constants.cpp gmp no_eh_support
           : # command line
           : # input files
           : # requirements
           <define>TEST_MPF_50
            [ check-target-builds ../config//has_gmp : : <build>no ]
           : test_constants_mpf50 ]

   [ run test_constants.cpp mpfr gmp no_eh_support
           : # command line
           : # input files
           : # requirements
           <define>TEST_MPFR_50
            [ check-target-builds ../config//has_mpfr : : <build>no ]
           : test_constants_mpfr_50 ]

   [ run test_constants.cpp no_eh_support
           : # command line
           : # input files
           : # requirements
           <define>TEST_CPP_DEC_FLOAT
           : test_constants_cpp_dec_float ]


   [ run test_test.cpp ]
   [ run test_cpp_int_lit.cpp no_eh_support ]
   [ run test_convert_cpp_int_2_float.cpp no_eh_support ]

      #
      # Interconversion tests:
      #
      [ run test_convert_from_cpp_int.cpp
              : # command line
              : # input files
              : # requirements
              [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
              [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
              [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
              [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
               [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ] 
              ]
      [ run test_convert_from_mpz_int.cpp
              : # command line
              : # input files
              : # requirements
              [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
              [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
              [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
              [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
               [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ] 
              ]
      [ run test_convert_from_tom_int.cpp
              : # command line
              : # input files
              : # requirements
              [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
              [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
              [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
              [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
               [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ] 
              ]
      [ run test_convert_from_cpp_rational.cpp
              : # command line
              : # input files
              : # requirements
              [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
              [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
              [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
              [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
               [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ] 
              ]
      [ run test_convert_from_gmp_rational.cpp
              : # command line
              : # input files
              : # requirements
              [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
              [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
              [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
              [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
               [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ] 
              ]
      [ run test_convert_from_tom_rational.cpp
              : # command line
              : # input files
              : # requirements
              [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
              [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
              [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
              [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
               [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ] 
              ]
      [ run test_convert_from_cpp_bin_float.cpp
              : # command line
              : # input files
              : # requirements
              [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
              [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
              [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
              [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
               [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ] 
              ]
      [ run test_convert_from_cpp_dec_float.cpp
              : # command line
              : # input files
              : # requirements
              [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
              [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
              [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
              [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
               [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ] 
              ]
      [ run test_convert_from_mpf_float.cpp
              : # command line
              : # input files
              : # requirements
              [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
              [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
              [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
              [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
               [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ] 
              ]
      [ run test_convert_from_mpfr_float.cpp
              : # command line
              : # input files
              : # requirements
              [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
              [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
              [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
              [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
               [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ] 
              ]
      [ run test_convert_from_mpfi_float.cpp
              : # command line
              : # input files
              : # requirements
              [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
              [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
              [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
              [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
               [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ] 
              ]
      [ run test_convert_from_float128.cpp
              : # command line
              : # input files
              : # requirements
              [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
              [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
              [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
              [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
               [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ] 
              ]

      [ run test_cpp_bin_float_conv.cpp ]

      [ run test_cpp_bin_float_io.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono
              : # command line
              : # input files
              : # requirements
              <define>TEST_CPP_BIN_FLOAT
               <define>TEST1
               release # Otherwise [ runtime is slow
              : test_cpp_bin_float_io_1
              ]

      [ run test_cpp_bin_float_io.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono
              : # command line
              : # input files
              : # requirements
              <define>TEST_CPP_BIN_FLOAT
               <define>TEST2
               release # Otherwise [ runtime is slow
              : test_cpp_bin_float_io_2
              ]

      [ run test_cpp_bin_float.cpp no_eh_support mpfr gmp /boost/system//boost_system /boost/chrono//boost_chrono
              : # command line
              : # input files
              : # requirements
              <define>TEST_MPFR
               [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no : ]
               [ check-target-builds ../config//has_mpfr : : <build>no ]
               release # Otherwise [ runtime is slow
              ]

      [ run test_float_io.cpp no_eh_support
              : # command line
              : # input files
              : # requirements
              <define>TEST_CPP_DEC_FLOAT
               release # Otherwise [ runtime is slow
              : test_float_io_cpp_dec_float ]

      [ run test_float_io.cpp gmp no_eh_support
              : # command line
              : # input files
              : # requirements
              <define>TEST_MPF_50
               release # Otherwise [ runtime is slow
               [ check-target-builds ../config//has_gmp : : <build>no ]
              : test_float_io_mpf ]

      [ run test_float_io.cpp mpfr gmp no_eh_support
              : # command line
              : # input files
              : # requirements
              <define>TEST_MPFR_50
               release # Otherwise [ runtime is slow
               [ check-target-builds ../config//has_mpfr : : <build>no ]
              : test_float_io_mpfr ]

      [ run test_float_io.cpp mpfi mpfr gmp no_eh_support
              : # command line
              : # input files
              : # requirements
              <define>TEST_MPFI_50
               release # Otherwise [ runtime is slow
               [ check-target-builds ../config//has_mpfi : : <build>no ]
              : test_float_io_mpfi ]

      [ run test_float_io.cpp quadmath no_eh_support
              : # command line
              : # input files
              : # requirements
              <define>TEST_FLOAT128
               release # Otherwise [ runtime is slow
               [ check-target-builds ../config//has_float128 : : <build>no ]
              : test_float_io_float128 ]
      [ run test_float_io.cpp no_eh_support
              : # command line
              : # input files
              : # requirements
              <define>TEST_FLOAT128
               release # Otherwise [ runtime is slow
               [ check-target-builds ../config//has_intel_quad : <cxxflags>-Qoption,cpp,--extended_float_type : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ]
              : test_float_io_intel_quad ]

      [ run test_int_io.cpp no_eh_support $(TOMMATH)
              : # command line
              : # input files
              : # requirements
              <define>TEST_TOMMATH
               release # Otherwise [ runtime is slow
               [ check-target-builds ../config//has_tommath : : <build>no ]
              : test_int_io_tommath ]

      [ run test_int_io.cpp no_eh_support gmp
              : # command line
              : # input files
              : # requirements
              <define>TEST_MPZ
               release # Otherwise [ runtime is slow
               [ check-target-builds ../config//has_gmp : : <build>no ]
              : test_int_io_mpz ]

      [ run test_fixed_zero_precision_io.cpp 
              : # command line
              : # input files
              : # requirements
              <define>TEST_BIN_FLOAT
               release
              : test_fixed_zero_precision_io_bin_float ]
      [ run test_fixed_zero_precision_io.cpp 
              : # command line
              : # input files
              : # requirements
              <define>TEST_DEC_FLOAT
               release
              : test_fixed_zero_precision_io_dec_float ]
      [ run test_fixed_zero_precision_io.cpp no_eh_support gmp
              : # command line
              : # input files
              : # requirements
              <define>TEST_MPF
               release
               [ check-target-builds ../config//has_gmp : : <build>no ]
              : test_fixed_zero_precision_io_mpf_float ]
      [ run test_fixed_zero_precision_io.cpp no_eh_support mpfr gmp
              : # command line
              : # input files
              : # requirements
              <define>TEST_MPFR
               release
               [ check-target-builds ../config//has_mpfr : : <build>no ]
              : test_fixed_zero_precision_io_mpfr_float ]
      [ run test_fixed_zero_precision_io.cpp no_eh_support quadmath
              : # command line
              : # input files
              : # requirements
              <define>TEST_FLOAT128
               release
               [ check-target-builds ../config//has_float128 : : <build>no ]
              : test_fixed_zero_precision_io_float128 ]

      [ run test_trailing_io_delim.cpp no_eh_support 
              : # command line
              : # input files
              : # requirements
              <define>TEST_CPP_INT
              : test_trailing_io_delim_cpp ]
      [ run test_trailing_io_delim.cpp no_eh_support gmp
              : # command line
              : # input files
              : # requirements
              <define>TEST_GMP
              [ check-target-builds ../config//has_gmp : : <build>no ]
              : test_trailing_io_delim_gmp ]
      [ run test_trailing_io_delim.cpp no_eh_support tommath
              : # command line
              : # input files
              : # requirements
              <define>TEST_TOMMATH
              [ check-target-builds ../config//has_tommath : : <build>no ]
              : test_trailing_io_delim_tommath ]
      [ run test_trailing_io_delim.cpp no_eh_support quadmath
              : # command line
              : # input files
              : # requirements
              <define>TEST_FLOAT128
              [ check-target-builds ../config//has_float128 : : <build>no ]
              : test_trailing_io_delim_float128 ]
      [ run test_trailing_io_delim.cpp no_eh_support mpc mpfr gmp
              : # command line
              : # input files
              : # requirements
              <define>TEST_MPC
              [ check-target-builds ../config//has_mpc : : <build>no ]
              : test_trailing_io_delim_mpc ]
      [ run test_trailing_io_delim.cpp no_eh_support mpfi mpfr gmp
              : # command line
              : # input files
              : # requirements
              <define>TEST_MPFI
              [ check-target-builds ../config//has_mpfi : : <build>no ]
              : test_trailing_io_delim_mpfi ]
;


test-suite cpp_int_tests :

      [ run test_int_io.cpp no_eh_support
           : # command line
           : # input files
           : # requirements
           <define>TEST_CPP_INT
            release # Otherwise    [ runtime is slow
           : test_int_io_cpp_int ]

      [ run test_cpp_int_left_shift.cpp gmp no_eh_support
           : # command line
           : # input files
           : # requirements
            [ check-target-builds ../config//has_gmp : : <build>no ]
            release  # otherwise    [ runtime is too slow!!
            ]

      [ run test_cpp_int.cpp gmp no_eh_support
           : # command line
           : # input files
           : # requirements
            [ check-target-builds ../config//has_gmp : : <build>no ]
            release  # otherwise    [ runtime is too slow!!
            <define>TEST1
            : test_cpp_int_1
            ]

      [ run test_cpp_int.cpp gmp no_eh_support
           : # command line
           : # input files
           : # requirements
            [ check-target-builds ../config//has_gmp : : <build>no ]
            release  # otherwise    [ runtime is too slow!!
            <define>TEST2
            : test_cpp_int_2
            ]

      [ run test_cpp_int.cpp gmp no_eh_support
           : # command line
           : # input files
           : # requirements
            [ check-target-builds ../config//has_gmp : : <build>no ]
            release  # otherwise    [ runtime is too slow!!
            <define>TEST3
            : test_cpp_int_3
            ]

      [ run test_cpp_int.cpp gmp no_eh_support
           : # command line
           : # input files
           : # requirements
            [ check-target-builds ../config//has_gmp : : <build>no ]
            release  # otherwise    [ runtime is too slow!!
            <define>TEST4
            : test_cpp_int_4
            ]

      [ run test_cpp_int.cpp gmp no_eh_support
           : # command line
           : # input files
           : # requirements
            [ check-target-builds ../config//has_gmp : : <build>no ]
            release  # otherwise    [ runtime is too slow!!
            <define>TEST5
            : test_cpp_int_5
            ]

      [ run test_cpp_int.cpp gmp no_eh_support
           : # command line
           : # input files
           : # requirements
            [ check-target-builds ../config//has_gmp : : <build>no ]
            release  # otherwise    [ runtime is too slow!!
            <define>TEST6
            : test_cpp_int_6
            ]

      [ run test_cpp_rational.cpp gmp no_eh_support
           : # command line
           : # input files
           : # requirements
            [ check-target-builds ../config//has_gmp : : <build>no ]
            release  # otherwise    [ runtime is too slow!!
            ]

      [ run test_cpp_int_karatsuba.cpp gmp no_eh_support
           : # command line
           : # input files
           : # requirements
            [ check-target-builds ../config//has_gmp : : <build>no ]
            release  # otherwise    [ runtime is too slow!!
            <define>TEST=1
            : test_cpp_int_karatsuba_1
            ]
      [ run test_cpp_int_karatsuba.cpp gmp no_eh_support
           : # command line
           : # input files
           : # requirements
            [ check-target-builds ../config//has_gmp : : <build>no ]
            release  # otherwise    [ runtime is too slow!!
            <define>TEST=2
            : test_cpp_int_karatsuba_2
            ]
      [ run test_cpp_int_karatsuba.cpp gmp no_eh_support
           : # command line
           : # input files
           : # requirements
            [ check-target-builds ../config//has_gmp : : <build>no ]
            release  # otherwise    [ runtime is too slow!!
            <define>TEST=3
            : test_cpp_int_karatsuba_3
            ]
      [ run test_cpp_int_karatsuba.cpp gmp no_eh_support
           : # command line
           : # input files
           : # requirements
            [ check-target-builds ../config//has_gmp : : <build>no ]
            release  # otherwise    [ runtime is too slow!!
            <define>TEST=4
            : test_cpp_int_karatsuba_4
            ]

      [ run test_int_sqrt.cpp no_eh_support ]

      [ run test_checked_cpp_int.cpp no_eh_support ]
      [ run test_unchecked_cpp_int.cpp no_eh_support : : : release ]

      [ run test_cpp_int_serial.cpp ../../serialization/build//boost_serialization : : : release <define>TEST1 <toolset>gcc-mingw:<link>static : test_cpp_int_serial_1 ]
      [ run test_cpp_int_serial.cpp ../../serialization/build//boost_serialization : : : release <define>TEST2 <toolset>gcc-mingw:<link>static : test_cpp_int_serial_2 ]
      [ run test_cpp_int_serial.cpp ../../serialization/build//boost_serialization : : : release <define>TEST3 <toolset>gcc-mingw:<link>static : test_cpp_int_serial_3 ]
      [ run test_cpp_int_serial.cpp ../../serialization/build//boost_serialization : : : release <define>TEST4 <toolset>gcc-mingw:<link>static : test_cpp_int_serial_4 ]
      [ run test_cpp_int_deserial.cpp ../../serialization/build//boost_serialization ../../filesystem/build//boost_filesystem : $(here)/serial_txts : : release <toolset>gcc-mingw:<link>static  ]
      [ run test_cpp_rat_serial.cpp ../../serialization/build//boost_serialization : : : release <toolset>gcc-mingw:<link>static  ]
      [ run test_gcd.cpp : : : [ requires cxx11_hdr_random ] ]
;

test-suite misc :

      [ compile test_constexpr.cpp : 
         [ check-target-builds ../config//has_float128 : <define>HAVE_FLOAT128 : ] 
         [ check-target-builds ../config//has_intel_quad : <cxxflags>-Qoption,cpp,--extended_float_type <define>HAVE_FLOAT128 : ] 
         [ requires cxx11_constexpr cxx11_user_defined_literals ] ]

      [ compile constexpr_test_arithmetic_backend.cpp : 
         [ requires cxx14_constexpr cxx17_if_constexpr ] ]
      [ compile constexpr_test_float128.cpp : 
         [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 : <source>quadmath : <build>no ] ]

      [ run constexpr_test_cpp_int.cpp : : : [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_is_constant_evaluated : : <build>no ] ]
      [ run constexpr_test_cpp_int_2.cpp : : : [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_is_constant_evaluated : : <build>no ] ]
      [ run constexpr_test_cpp_int_3.cpp : : : [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_is_constant_evaluated : : <build>no ] ]
      [ run constexpr_test_cpp_int_4.cpp : : : [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_is_constant_evaluated : : <build>no ] ]
      [ run constexpr_test_cpp_int_5.cpp : : : [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_is_constant_evaluated : : <build>no ] ]
      [ run constexpr_test_cpp_int_6.cpp : : : [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_is_constant_evaluated : <toolset>msvc:<cxxflags>-constexpr:steps10000000 <toolset>clang:<cxxflags>-fconstexpr-steps=268435456 : <build>no ] [ check-target-builds ../config//has_constexpr_limits : <cxxflags>-fconstexpr-ops-limit=268435456 ] ]
      [ run constexpr_test_cpp_int_7.cpp : : : [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_is_constant_evaluated : <toolset>msvc:<cxxflags>-constexpr:steps10000000 <toolset>clang:<cxxflags>-fconstexpr-steps=268435456 : <build>no ] ]

      [ compile test_nothrow_cpp_int.cpp ]
      [ compile test_nothrow_cpp_rational.cpp ]
      [ compile test_nothrow_cpp_bin_float.cpp ]
      [ compile test_nothrow_cpp_dec_float.cpp ]
      [ compile test_nothrow_float128.cpp : [ check-target-builds ../config//has_float128 : : <build>no ] ]
      [ compile test_nothrow_gmp.cpp : [ check-target-builds ../config//has_gmp : : <build>no ] ]
      [ compile test_nothrow_mpfr.cpp : [ check-target-builds ../config//has_mpfr : : <build>no ] ]

      [ run test_miller_rabin.cpp no_eh_support gmp
              : # command line
              : # input files
              : # requirements
               [ check-target-builds ../config//has_gmp : : <build>no ]
               release  # otherwise [ runtime is too slow!!
               ]

      [ run test_rational_io.cpp $(TOMMATH) no_eh_support
              : # command line
              : # input files
              : # requirements
              <define>TEST_TOMMATH
               [ check-target-builds ../config//has_tommath : : <build>no ]
               release # Otherwise [ runtime is slow
              : test_rational_io_tommath ]

      [ run test_rational_io.cpp gmp no_eh_support
              : # command line
              : # input files
              : # requirements
              <define>TEST_MPQ
               [ check-target-builds ../config//has_gmp : : <build>no ]
               release # Otherwise [ runtime is slow
              : test_rational_io_mpz ]

      [ run test_rational_io.cpp no_eh_support
              : # command line
              : # input files
              : # requirements
              <define>TEST_CPP_INT
               release # Otherwise [ runtime is slow
              : test_rational_io_cpp_int ]

      [ run test_generic_conv.cpp no_eh_support
              : # command line
              : # input files
              : # requirements
               [ check-target-builds ../config//has_gmp : <define>TEST_GMP <source>gmp :  ]
               [ check-target-builds ../config//has_tommath : <define>TEST_TOMMATH <source>$(TOMMATH) :  ]
               [ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <source>mpfr :  ]
               release # Otherwise [ runtime is slow
               ]

      [ run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono
              : # command line
              : # input files
              : # requirements
              <define>TEST1
              release 
              : test_rat_float_interconv_1 ]

      [ run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono
              : # command line
              : # input files
              : # requirements
              <define>TEST2
              release 
              : test_rat_float_interconv_2 ]

      [ run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono
              : # command line
              : # input files
              : # requirements
              <define>TEST3
              release 
              : test_rat_float_interconv_3 ]

      [ run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono
              : # command line
              : # input files
              : # requirements
              <define>TEST4
              release 
              : test_rat_float_interconv_4 ]

      [ run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono mpfr gmp
              : # command line
              : # input files
              : # requirements
              <define>TEST5
              [ check-target-builds ../config//has_mpfr : : <build>no ]
              release 
              : test_rat_float_interconv_5 ]

      [ run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono mpfr gmp
              : # command line
              : # input files
              : # requirements
              <define>TEST6
              [ check-target-builds ../config//has_mpfr : : <build>no ]
              release 
              : test_rat_float_interconv_6 ]

      [ run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono mpfr gmp
              : # command line
              : # input files
              : # requirements
              <define>TEST7
              [ check-target-builds ../config//has_mpfr : : <build>no ]
              release 
              : test_rat_float_interconv_7 ]

      [ run test_rat_float_interconv.cpp no_eh_support /boost/system//boost_system /boost/chrono//boost_chrono mpfr gmp
              : # command line
              : # input files
              : # requirements
              <define>TEST8
              [ check-target-builds ../config//has_mpfr : : <build>no ]
              release 
              : test_rat_float_interconv_8 ]

      [ run test_cpp_int_conv.cpp no_eh_support ]
      [ run test_cpp_int_import_export.cpp no_eh_support ]
      [ run test_native_integer.cpp no_eh_support ]

      [ run test_mixed_move_cpp_int.cpp no_eh_support ]
      [ run test_mixed_cpp_int.cpp no_eh_support ]
      [ run test_mixed_float.cpp no_eh_support
              : # command line
              : # input files
              : # requirements
               [ check-target-builds ../config//has_gmp : <define>TEST_GMP <library>gmp : ]
               [ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <library>mpfr <library>gmp : ] ]
      [ compile include_test/mpfr_include_test.cpp
                    : # requirements
                     [ check-target-builds ../config//has_mpfr : : <build>no ] ]
      [ compile include_test/gmp_include_test.cpp
                    : # requirements
                     [ check-target-builds ../config//has_gmp : : <build>no ] ]
      [ compile include_test/tommath_include_test.cpp
                    : # requirements
                     [ check-target-builds ../config//has_tommath : : <build>no ] ]
      [ compile include_test/cpp_int_include_test.cpp ]
      [ compile include_test/cpp_dec_float_include_test.cpp ]
      [ compile include_test/cpp_bin_float_include_test.cpp ]

      [ run ublas_interop/test1.cpp ublas_interop/test11.cpp ublas_interop/test12.cpp ublas_interop/test13.cpp no_eh_support ]
      [ run ublas_interop/test2.cpp ublas_interop/test21.cpp ublas_interop/test22.cpp ublas_interop/test23.cpp no_eh_support ]
      #[ run ublas_interop/test3.cpp ublas_interop/test31.cpp ublas_interop/test32.cpp ublas_interop/test33.cpp ]
      [ run ublas_interop/test4.cpp ublas_interop/test42.cpp ublas_interop/test43.cpp no_eh_support ]
      [ run ublas_interop/test5.cpp ublas_interop/test52.cpp ublas_interop/test53.cpp no_eh_support ]
      [ run ublas_interop/test6.cpp ublas_interop/test62.cpp ublas_interop/test63.cpp no_eh_support ]
      #[ run ublas_interop/test7.cpp ublas_interop/test71.cpp ublas_interop/test72.cpp ublas_interop/test73.cpp ]

      [ 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 ]
      [ 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 ]
      #[ run ublas_interop/test3.cpp ublas_interop/test31.cpp ublas_interop/test32.cpp ublas_interop/test33.cpp : : : <define>TEST_ET=1 : ublas3_et ]
      [ run ublas_interop/test4.cpp ublas_interop/test42.cpp ublas_interop/test43.cpp no_eh_support : : : <define>TEST_ET=1 : ublas3_et ]
      [ run ublas_interop/test5.cpp ublas_interop/test52.cpp ublas_interop/test53.cpp no_eh_support : : : <define>TEST_ET=1 : ublas4_et ]
      [ run ublas_interop/test6.cpp ublas_interop/test62.cpp ublas_interop/test63.cpp no_eh_support : : : <define>TEST_ET=1 : ublas5_et ]
      #[ run ublas_interop/test7.cpp ublas_interop/test71.cpp ublas_interop/test72.cpp ublas_interop/test73.cpp : : : <define>TEST_ET=1 : ublas6_et ]

      #
      # Serialization tests, run in release mode so we cycle through more values:
      #
      [ run test_adapt_serial.cpp ../../serialization/build//boost_serialization : : : release <toolset>gcc-mingw:<link>static  ]
      [ 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 ]
      [ 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 ]
      [ run test_float128_serial.cpp ../../serialization/build//boost_serialization quadmath : : : release <toolset>gcc-mingw:<link>static  [ check-target-builds ../config//has_float128 : : <build>no ]  ]
      [ 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 ]
      [ 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 ]

      #
      # Mixed mode comparison tests, see: https://svn.boost.org/trac/boost/ticket/11328
      #
      [ run test_checked_mixed_cpp_int.cpp no_eh_support ]
      [ run test_mixed_cpp_bin_float.cpp no_eh_support ]
      [ run test_mixed_cpp_dec_float.cpp no_eh_support ]
      [ run test_mixed_mpf_float.cpp gmp no_eh_support : : : [ check-target-builds ../config//has_gmp : : <build>no ] ]
      [ run test_mixed_mpfr_float.cpp  mpfr gmp no_eh_support : : : [ check-target-builds ../config//has_mpfr : : <build>no ] ]
      #
      # Check for narrowing conversions:
      #
      [ run test_float_conversions.cpp no_eh_support ]
      #
      # specific bug cases:
      #
      [ compile bug11922.cpp ]
      [ run bug12039.cpp no_eh_support ]
      [ compile git_issue_30.cpp ]
      [ run git_issue_167.cpp ]
      [ run git_issue_370.cpp ]
      [ run git_issue_175.cpp ]
      [ run git_issue_248.cpp ]
      [ run git_issue_265.cpp : : : [ check-target-builds ../config//has_mpfr : <source>gmp <source>mpfr : <build>no ] ]
      [ run git_issue_426.cpp : : : [ check-target-builds ../config//has_mpfr : <source>gmp <source>mpfr <define>TEST_MPFR ] [ check-target-builds ../config//has_float128 : <source>quadmath <define>TEST_FLOAT128 ] ]
      [ run git_issue_277.cpp ]
      [ run git_issue_313.cpp ]
      [ run git_issue_488.cpp ]
      [ compile git_issue_98.cpp : 
         [ check-target-builds ../config//has_float128 : <define>TEST_FLOAT128 <source>quadmath : ]
         [ check-target-builds ../config//has_gmp : <define>TEST_GMP <source>gmp : ]
         [ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <source>gmp <source>mpfr : ]
         [ check-target-builds ../config//has_mpc : <define>TEST_MPC <source>gmp <source>mpfr <source>mpc : ] ]
      [ run issue_13301.cpp ]
      [ run issue_13148.cpp ]
      [ run test_hash.cpp : : : 
         [ check-target-builds ../config//has_float128 : <define>TEST_FLOAT128 <source>quadmath : ]
         [ check-target-builds ../config//has_gmp : <define>TEST_GMP <source>gmp : ]
         [ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <source>gmp <source>mpfr : ]
         [ check-target-builds ../config//has_mpfi : <define>TEST_MPFI <source>gmp <source>mpfr <source>mpfi : ]
         [ check-target-builds ../config//has_tommath : <define>TEST_TOMMATH <source>tommath : ]
          ]
      [ run test_optional_compat.cpp ]
      #
      # Eigen interoperability:
      #
      [ run test_eigen_interop_cpp_int.cpp : : : release [ check-target-builds ../config//has_eigen : : <build>no ] ]
      [ run test_eigen_interop_cpp_dec_float.cpp : : : release [ check-target-builds ../config//has_eigen : : <build>no ] ]
      [ run test_eigen_interop_cpp_dec_float_2.cpp : : : release [ check-target-builds ../config//has_eigen : : <build>no ] ]
      [ run test_eigen_interop_cpp_dec_float_3.cpp : : : release [ check-target-builds ../config//has_eigen : : <build>no ] ]
      [ run test_eigen_interop_cpp_bin_float_1.cpp : : : release [ check-target-builds ../config//has_eigen : : <build>no ] ]
      [ run test_eigen_interop_cpp_bin_float_2.cpp : : : release [ check-target-builds ../config//has_eigen : : <build>no ] ]
      [ run test_eigen_interop_cpp_bin_float_3.cpp : : : release [ check-target-builds ../config//has_eigen : : <build>no ] ]
      [ 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 ] ]
      [ 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 ] ]
      [ 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 ] ]
      [ run test_eigen_interop_mpfr_4.cpp mpfr gmp : : : release [ check-target-builds ../config//has_eigen : : <build>no ] [ check-target-builds ../config//has_mpfr : : <build>no ] ]
      [ run test_eigen_interop_mpfr_5.cpp mpfr gmp : : : release [ check-target-builds ../config//has_eigen : : <build>no ] [ check-target-builds ../config//has_mpfr : : <build>no ] ]
      [ run test_eigen_interop_mpfr_6.cpp mpfr gmp : : : release [ check-target-builds ../config//has_eigen : : <build>no ] [ check-target-builds ../config//has_mpfr : : <build>no ] ]
      [ run test_eigen_interop_gmp.cpp gmp : : : release [ check-target-builds ../config//has_eigen : : <build>no ] [ check-target-builds ../config//has_gmp : : <build>no ] ]
      [ run test_eigen_interop_gmp_2.cpp gmp : : : release [ check-target-builds ../config//has_eigen : : <build>no ] [ check-target-builds ../config//has_gmp : : <build>no ] ]
      [ 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 ] ]
      [ compile git_issue_393.cpp : release [ check-target-builds ../config//has_eigen : : <build>no ] ]
;

alias eigen_tests : 
    test_eigen_interop_cpp_int test_eigen_interop_cpp_dec_float test_eigen_interop_cpp_dec_float_2 test_eigen_interop_cpp_dec_float_3
    test_eigen_interop_cpp_bin_float_1 test_eigen_interop_cpp_bin_float_2 test_eigen_interop_cpp_bin_float_3 test_eigen_interop_mpfr_1
    test_eigen_interop_mpfr_2 test_eigen_interop_mpfr_3 test_eigen_interop_mpfr_4 test_eigen_interop_mpfr_5 test_eigen_interop_mpfr_6 
    test_eigen_interop_gmp test_eigen_interop_gmp_2 test_eigen_interop_mpc git_issue_393 ;

test-suite standalone :

      [ run standalone_constexpr_test_cpp_int.cpp : : : [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_is_constant_evaluated : : <build>no ] ]
      [ compile standalone_constexpr_test_float128.cpp : 
         [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 : <source>quadmath : <build>no ] ]
      
      [ run standalone_test_arithmetic_complex128.cpp : : : [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
      [ run standalone_test_arithmetic_cpp_bin_float.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
      [ run standalone_test_arithmetic_cpp_dec_float.cpp no_eh_support  : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
      [ run standalone_test_arithmetic_cpp_int.cpp no_eh_support : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
      [ run standalone_test_arithmetic_int512.cpp no_eh_support : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
      [ run standalone_test_arithmetic_cpp_rational.cpp no_eh_support : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
      [ run standalone_test_arithmetic_tommath.cpp $(TOMMATH) no_eh_support : : : [ check-target-builds ../config//has_tommath : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
      [ run standalone_test_arithmetic_float_128.cpp quadmath no_eh_support : : : [ check-target-builds ../config//has_float128 : : <build>no ] ]
      [ run standalone_test_arithmetic_gmp.cpp gmp no_eh_support : : : [ check-target-builds ../config//has_gmp : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
      [ run standalone_test_arithmetic_mpf_logged_adptr.cpp gmp : : : <toolset>msvc:<cxxflags>-bigobj [ check-target-builds ../config//has_gmp : : <build>no ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]

      [ run standalone_test_miller_rabin.cpp no_eh_support gmp
                : # command line
                : # input files
                : # requirements
                [ check-target-builds ../config//has_gmp : : <build>no ]
                release  # otherwise [ runtime is too slow!!
      ]

      [ run standalone_test_convert_from_tom_int.cpp
              : # command line
              : # input files
              : # requirements
              [ check-target-builds ../config//has_gmp : <define>HAS_GMP <source>gmp : ]
              [ check-target-builds ../config//has_mpfr : <define>HAS_MPFR <source>gmp <source>mpfr : ]
              [ check-target-builds ../config//has_mpfi : <define>HAS_MPFI <source>gmp <source>mpfr <source>mpfi : ]
              [ check-target-builds ../config//has_tommath : <define>HAS_TOMMATH <source>tommath : ]
               [ check-target-builds ../config//has_float128 : <define>HAS_FLOAT128 <source>quadmath : ] 
              ]
;

#
# This take too long to run as a regular part of the tests:
#
run test_cpp_bin_float_round.cpp mpfr gmp ;
explicit test_cpp_bin_float_round ;

high_precision_points = 35 40 41 50 51 60 61 70 71 80 81 100 101 450 ;

rule get_specfun_tests_mpfr
{
   local result ;
   for local source in [ glob math/*.cpp ]
   {
      result += [ run $(source) mpfr gmp 
            /boost/test//boost_unit_test_framework/<link>static 
            math/instances//test_instances_mpfr/<link>static
           : # command line
           : # input files
           : # requirements
            [ check-target-builds ../config//has_mpfr : : <build>no ]
            [ check-target-builds ../config//has_float128 : <source>quadmath ]
            <define>TEST_MPFR_50
            <optimization>speed
            <define>BOOST_ALL_NO_LIB
            <define>BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
            <toolset>msvc:<cxxflags>-bigobj
            <include>../../math/include_private
            release
           : $(source:B)_mpfr ] ;
   }
   for local digits in $(high_precision_points)
   {
      result += [ run math/high_prec/test_gamma.cpp
            /boost/test//boost_unit_test_framework/<link>static 
           : # command line
           : # input files
           : # requirements
            <optimization>speed
            <define>BOOST_ALL_NO_LIB
            <define>TEST_PRECISION=$(digits)
            <toolset>msvc:<cxxflags>-bigobj
            [ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <source>gmp <source>mpfr : <build>no ]
            [ check-target-builds ../config//has_float128 : <source>quadmath ]
            <include>../../math/include_private
            release
            : test_gamma_mpfr_$(digits) ] ;

   }
   return $(result) ;
}

rule get_specfun_tests_gmp
{
   local result ;
   for local source in [ glob math/*.cpp ]
   {
      result += [ run $(source) gmp 
            /boost/test//boost_unit_test_framework/<link>static 
            math/instances//test_instances_mpf/<link>static
           : # command line
           : # input files
           : # requirements
            [ check-target-builds ../config//has_gmp : : <build>no ]
            [ check-target-builds ../config//has_float128 : <source>quadmath ]
            <optimization>speed
            <define>TEST_MPF_50
            <define>BOOST_ALL_NO_LIB
            <toolset>msvc:<cxxflags>-bigobj
            <include>../../math/include_private
            release
           : $(source:B)_mpf ] ;
   }
   for local digits in $(high_precision_points)
   {
      result += [ run math/high_prec/test_gamma.cpp
            /boost/test//boost_unit_test_framework/<link>static 
           : # command line
           : # input files
           : # requirements
            <optimization>speed
            <define>BOOST_ALL_NO_LIB
            <define>TEST_PRECISION=$(digits)
            <toolset>msvc:<cxxflags>-bigobj
            [ check-target-builds ../config//has_gmp : <define>TEST_MPF <source>gmp : <build>no ]
            [ check-target-builds ../config//has_float128 : <source>quadmath ]
            <include>../../math/include_private
            release
            : test_gamma_gmp_$(digits) ] ;

   }
   return $(result) ;
}

rule get_specfun_tests_cpp_dec_float
{
   local result ;
   for local source in [ glob math/*.cpp ]
   {
      result += [ run $(source) /boost/test//boost_unit_test_framework/<link>static 
               math/instances//test_instances_cpp_dec_float/<link>static
           : # command line
           : # input files
           : # requirements
            [ check-target-builds ../config//has_float128 : <source>quadmath ]
            <define>TEST_CPP_DEC_FLOAT
            <define>BOOST_ALL_NO_LIB
            <toolset>msvc:<cxxflags>-bigobj
            <include>../../math/include_private
            release
           : $(source:B)_cpp_dec_float ] ;
   }
   for local digits in $(high_precision_points)
   {
      result += [ run math/high_prec/test_gamma.cpp
            /boost/test//boost_unit_test_framework/<link>static 
           : # command line
           : # input files
           : # requirements
            <optimization>speed
            <define>BOOST_ALL_NO_LIB
            <define>TEST_PRECISION=$(digits)
            <toolset>msvc:<cxxflags>-bigobj
            <define>TEST_CPP_DEC_FLOAT
            <include>../../math/include_private
            release
            : test_gamma_cpp_dec_float_$(digits) ] ;
   }
   return $(result) ;
}

rule get_specfun_tests_cpp_bin_float
{
   local result ;
   for local source in [ glob math/*.cpp ]
   {
      result += [ run $(source) /boost/test//boost_unit_test_framework/<link>static 
               math/instances//test_instances_cpp_bin_float/<link>static
           : # command line
           : # input files
           : # requirements
            <define>TEST_CPP_BIN_FLOAT
            <define>BOOST_ALL_NO_LIB
            <toolset>msvc:<cxxflags>-bigobj
            <include>../../math/include_private
            release
            [ check-target-builds ../config//has_float128 : <source>quadmath ]
           : $(source:B)_cpp_bin_float ] ;
   }
   for local digits in $(high_precision_points)
   {
      result += [ run math/high_prec/test_gamma.cpp
            /boost/test//boost_unit_test_framework/<link>static 
           : # command line
           : # input files
           : # requirements
            <optimization>speed
            <define>BOOST_ALL_NO_LIB
            <define>TEST_PRECISION=$(digits)
            <toolset>msvc:<cxxflags>-bigobj
            <define>TEST_CPP_BIN_FLOAT
            [ check-target-builds ../config//has_float128 : <source>quadmath ]
            <include>../../math/include_private
            release
            : test_gamma_cpp_bin_float_$(digits) ] ;

   }
   return $(result) ;
}

rule get_specfun_tests_float128
{
   local result ;
   for local source in [ glob math/*.cpp ]
   {
      result += [ run $(source) quadmath 
            /boost/test//boost_unit_test_framework/<link>static 
            math/instances//test_instances_float128/<link>static
           : # command line
           : # input files
           : # requirements
            [ check-target-builds ../config//has_float128 : : <build>no ]
            <optimization>speed
            <define>TEST_FLOAT128
            <define>BOOST_ALL_NO_LIB
            <define>BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
            <toolset>msvc:<cxxflags>-bigobj
            <include>../../math/include_private
            release
           : $(source:B)_float128 ] ;
   }
   return $(result) ;
}

rule get_specfun_tests_intel_quad
{
   local result ;
   for local source in [ glob math/*.cpp ]
   {
      result += [ run $(source)
            /boost/test//boost_unit_test_framework/<link>static 
            math/instances//test_instances_intel_quad/<link>static
           : # command line
           : # input files
           : # requirements
            [ check-target-builds ../config//has_intel_quad : <cxxflags>-Qoption,cpp,--extended_float_type : <build>no ] 
            [ check-target-builds ../config//has_float128 : <source>quadmath ]
            <optimization>speed
            <define>TEST_FLOAT128
            <define>BOOST_ALL_NO_LIB
            <define>BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE
            <toolset>msvc:<cxxflags>-bigobj
            <include>../../math/include_private
            release
           : $(source:B)_intel_quad ] ;
   }
   return $(result) ;
}

test-suite specfun_mpfr : [ get_specfun_tests_mpfr ] ;
explicit specfun_mpfr ;
test-suite specfun_gmp : [ get_specfun_tests_gmp ] ;
explicit specfun_gmp ;
test-suite specfun_cpp_dec_float : [ get_specfun_tests_cpp_dec_float ] ;
explicit specfun_cpp_dec_float ;
test-suite specfun_cpp_bin_float : [ get_specfun_tests_cpp_bin_float ] ;
explicit specfun_cpp_bin_float ;
test-suite specfun_float128 : [ get_specfun_tests_float128 ] ;
explicit specfun_float128 ;
test-suite specfun_intel_quad : [ get_specfun_tests_intel_quad ] ;
explicit specfun_intel_quad ;

test-suite specfun : specfun_mpfr specfun_gmp specfun_cpp_dec_float specfun_cpp_bin_float specfun_float128 specfun_intel_quad ;
explicit specfun ;

rule get_compile_fail_tests
{

   local compile_fail_tests ;

   for local source in [ glob compile_fail/*.cpp ]
   {
      compile_fail_tests +=  $(source:B) ;
      compile-fail $(source)
      :
         [ check-target-builds ../config//has_gmp : <define>TEST_GMP <debug-symbols>off : ]
         [ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <debug-symbols>off : ]
      ;
   }
   return $(compile_fail_tests) ;
}

test-suite compile_fail :  [ get_compile_fail_tests ] ;

rule get_concept_checks
{
   local result ;
   for local source in [ glob concepts/*.cpp ]
   {

      result += [ compile $(source)  mpfr
              : # requirements
              <define>TEST_MPFR_50
               [ check-target-builds ../config//has_mpfr : : <build>no ]
               <debug-symbols>off
               <optimization>space
              : $(source:B)_mpfr_50 ] ;

      result += [ compile $(source)  mpfr
              : # requirements
              <define>TEST_MPFR_6
               [ check-target-builds ../config//has_mpfr : : <build>no ]
               <debug-symbols>off
               <optimization>space
              : $(source:B)_mpfr_6 ] ;

      result += [ compile $(source)  mpfr
              : # requirements
              <define>TEST_MPFR_15
               [ check-target-builds ../config//has_mpfr : : <build>no ]
               <debug-symbols>off
               <optimization>space
              : $(source:B)_mpfr_15 ] ;

      result += [ compile $(source)  mpfr
              : # requirements
              <define>TEST_MPFR_17
               [ check-target-builds ../config//has_mpfr : : <build>no ]
               <debug-symbols>off
               <optimization>space
              : $(source:B)_mpfr_17 ] ;

      result += [ compile $(source)  mpfr
              : # requirements
              <define>TEST_MPFR_30
               [ check-target-builds ../config//has_mpfr : : <build>no ]
               <debug-symbols>off
               <optimization>space
              : $(source:B)_mpfr_30 ] ;

      result += [ compile $(source)  gmp
              : # requirements
              <define>TEST_MPF_50
               [ check-target-builds ../config//has_gmp : : <build>no ]
               <debug-symbols>off
               <optimization>space
              : $(source:B)_mpf50 ] ;

      result += [ compile $(source)
              : # requirements
              <define>TEST_CPP_DEC_FLOAT
               <debug-symbols>off
               <optimization>space
              : $(source:B)_cpp_dec_float ] ;

      result += [ compile $(source)
              : # requirements
              <define>TEST_CPP_BIN_FLOAT
               <debug-symbols>off
               <optimization>space
              : $(source:B)_cpp_bin_float ] ;

      result += [ compile $(source)
              : # requirements
              <define>TEST_CPP_DEC_FLOAT_NO_ET
               <debug-symbols>off
               <optimization>space
              : $(source:B)_cpp_dec_float_no_et ] ;

      result += [ compile $(source)
              : # requirements
              <define>TEST_BACKEND
               <debug-symbols>off
               <optimization>space
              : $(source:B)_backend_concept ] ;

      result += [ compile $(source)
              : # requirements
              <define>TEST_LOGGED_ADAPTER
               <debug-symbols>off
               <optimization>space
              : $(source:B)_logged_adaptor ] ;
   }
   return $(result) ;
}

test-suite concepts : [ get_concept_checks ] ;

test-suite examples : ../example//examples ;
test-suite performance : ../performance//performance ;