Jamfile.v2 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. # \libs\math\example\jamfile.v2
  2. # Runs multiprecision examples.
  3. # Copyright 2014 John Maddock
  4. # Copyright Paul A. Bristow 2014.
  5. # Copyright Christpher Kormanyos 2014
  6. # Distributed under the Boost Software License, Version 1.0.
  7. # (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  8. # bring in the rules for testing
  9. import testing ;
  10. import modules ;
  11. import path ;
  12. import ../../config/checks/config : requires ;
  13. local ntl-path = [ modules.peek : NTL_PATH ] ;
  14. local gmp_path = [ modules.peek : GMP_PATH ] ;
  15. local mpfr_path = [ modules.peek : MPFR_PATH ] ;
  16. local mpfi_path = [ modules.peek : MPFI_PATH ] ;
  17. local tommath_path = [ modules.peek : TOMMATH_PATH ] ;
  18. project
  19. : requirements
  20. <include>$(gmp_path)
  21. <include>$(gmp_path)/mpfr
  22. <include>$(gmp_path)/gmpfrxx
  23. <include>$(mpfr_path)
  24. <include>$(mpfi_path)
  25. <include>$(mpfi_path)/src
  26. <include>$(tommath_path)
  27. <include>../include
  28. <include>../../..
  29. <toolset>gcc:<cxxflags>-Wno-missing-braces
  30. # Assembler error "File too big" caused by lots of C++ templates, for example, math/floating_point_examples.cpp.
  31. # Some projects on some toolsets may require
  32. # <toolset>gcc-mingw:<cxxflags>\"-Wa,-mbig-obj\"
  33. # See https://digitalkarabela.com/mingw-w64-how-to-fix-file-too-big-too-many-sections/
  34. # <toolset>gcc-mingw:<cxxflags>-Wa,-mbig-obj # Some projects may overflow assembler and require equivalent of MSVC /bigobj.
  35. # Requires version 2.30 of GNU binutils.
  36. # Best applied only to projects that require this, see run math/floating_point_examples.cpp below.
  37. <toolset>darwin:<cxxflags>-Wno-missing-braces
  38. <toolset>acc:<cxxflags>+W2068,2461,2236,4070
  39. <toolset>intel:<cxxflags>-Qwd264,239
  40. <toolset>msvc:<runtime-link>static
  41. <toolset>msvc:<link>static
  42. <toolset>msvc:<warnings>all
  43. <toolset>msvc:<asynch-exceptions>on
  44. <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
  45. <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
  46. <toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
  47. <toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS
  48. <toolset>msvc:<cxxflags>/wd4996
  49. <toolset>msvc:<cxxflags>/wd4512
  50. <toolset>msvc:<cxxflags>/wd4610
  51. <toolset>msvc:<cxxflags>/wd4510
  52. <toolset>msvc:<cxxflags>/wd4127
  53. <toolset>msvc:<cxxflags>/wd4701
  54. <toolset>msvc:<cxxflags>/wd4127
  55. <toolset>msvc:<cxxflags>/wd4305
  56. ;
  57. lib gmp : : <search>$(gmp_path) ;
  58. lib mpfr : : <search>$(gmp_path) <search>$(mpfr_path) <search>$(mpfr_path)/build.vc10/lib/Win32/Debug ;
  59. lib mpfi : : <search>$(gmp_path) <search>$(mpfr_path) <search>$(mpfr_path)/build.vc10/lib/Win32/Debug <search>$(mpfi_path) <search>$(mpfi_path)/src ;
  60. lib quadmath ;
  61. if $(tommath_path)
  62. {
  63. lib tommath : [ GLOB $(tommath_path) : *.c ] ;
  64. TOMMATH = tommath ;
  65. }
  66. else
  67. {
  68. lib tommath : : <search>$(tommath_path) ;
  69. TOMMATH = tommath ;
  70. }
  71. lib no_eh_eg_support : ../test/no_eh_test_support.cpp ;
  72. test-suite examples :
  73. [ run cpp_int_snips.cpp no_eh_eg_support ]
  74. [ run cpp_int_import_export.cpp no_eh_eg_support ]
  75. [ run cpp_bin_float_import_export.cpp no_eh_eg_support ]
  76. [ run cpp_dec_float_snips.cpp no_eh_eg_support ]
  77. [ run cpp_bin_float_snips.cpp no_eh_eg_support ]
  78. [ run debug_adaptor_snips.cpp no_eh_eg_support ]
  79. [ run float128_snips.cpp quadmath no_eh_eg_support : : : [ check-target-builds ../config//has_float128 : : <build>no ] ]
  80. [ run floating_point_examples.cpp no_eh_eg_support : : : <toolset>gcc-mingw:<cxxflags>-Wa,-mbig-obj ] # See note above.
  81. [ run gauss_laguerre_quadrature.cpp no_eh_eg_support : : : release [ requires cxx11_lambdas ] ]
  82. [ run hypergeometric_luke_algorithms.cpp no_eh_eg_support ../../chrono/build//boost_chrono ../../system/build//boost_system : : : [ requires cxx11_nullptr ] ]
  83. [ run integer_examples.cpp no_eh_eg_support ]
  84. [ run logged_adaptor.cpp no_eh_eg_support mpfi mpfr gmp : : : [ check-target-builds ../config//has_mpfi : : <build>no ] ]
  85. [ run mixed_integer_arithmetic.cpp no_eh_eg_support ]
  86. [ run numeric_limits_snips.cpp no_eh_eg_support /boost//test_exec_monitor : : : [ requires cxx11_numeric_limits ] [ check-target-builds ../config//has_float128 : <source>quadmath ] ]
  87. [ run random_snips.cpp gmp no_eh_eg_support : : : [ requires cxx11_explicit_conversion_operators ] [ check-target-builds ../config//has_gmp : : <build>no ] ]
  88. [ run safe_prime.cpp no_eh_eg_support ]
  89. [ run gmp_snips.cpp gmp no_eh_eg_support : : : [ check-target-builds ../config//has_gmp : : <build>no ] ]
  90. [ run mpfi_snips.cpp mpfi mpfr gmp no_eh_eg_support : : : [ check-target-builds ../config//has_mpfi : : <build>no ] ]
  91. [ run mpfr_snips.cpp mpfr gmp no_eh_eg_support : : : [ check-target-builds ../config//has_mpfr : : <build>no ] ]
  92. [ run tommath_snips.cpp $(TOMMATH) no_eh_eg_support : : : [ check-target-builds ../config//has_tommath : : <build>no ] ]
  93. [ compile constexpr_float_arithmetic_examples.cpp : [ requires cxx14_constexpr cxx17_if_constexpr ] ]
  94. ;