Jamfile.v2 57 KB

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