Jamfile.v2 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. # Copyright Daryle Walker, Hubert Holin, John Maddock 2006 - 2007
  2. # copyright Paul A. Bristow 2006 - 2010
  3. # Distributed under the Boost Software License, Version 1.0.
  4. # (See accompanying file LICENSE_1_0.txt or copy at
  5. # http://www.boost.org/LICENSE_1_0.txt.
  6. # \math_toolkit\libs\math\test\jamfile.v2
  7. # Runs all math toolkit tests, functions & distributions,
  8. # and build math examples.
  9. # bring in the rules for testing
  10. import testing ;
  11. import modules ;
  12. import path ;
  13. import pch ;
  14. import ../../../config/checks/config : requires ;
  15. using quickbook ;
  16. using auto-index ;
  17. import ../../../predef/check/predef
  18. : check require
  19. : predef-check predef-require ;
  20. project
  21. : requirements
  22. <include>../../include_private
  23. ;
  24. if $(is_unix)
  25. {
  26. local osname = [ SHELL uname ] ;
  27. switch $(osname)
  28. {
  29. case "Sun*" : OTHERFLAGS = "-lpthread -lrt" ;
  30. case "*BSD*" : OTHERFLAGS = "-lpthread" ;
  31. }
  32. }
  33. #
  34. # Configuration first:
  35. #
  36. lib gsl ;
  37. lib gslcblas ;
  38. lib Rmath ;
  39. obj has_libstdcxx_tr1 : has_libstdcxx_tr1.cpp ;
  40. explicit has_libstdcxx_tr1 ;
  41. obj has_c99_cmath : has_c99_cmath.cpp ;
  42. explicit has_c99_cmath ;
  43. exe has_gsl : has_gsl.cpp gsl gslcblas ;
  44. explicit has_gsl ;
  45. exe has_rmath : has_rmath.cpp Rmath ;
  46. explicit has_rmath ;
  47. obj is_intel_win : is_intel_win.cpp ;
  48. explicit is_intel_win ;
  49. CEPHES_SOURCE = acosh.c airy.c asin.c asinh.c atan.c atanh.c bdtr.c beta.c
  50. btdtr.c cbrt.c chbevl.c chdtr.c clog.c cmplx.c const.c
  51. cosh.c dawsn.c drand.c ei.c ellie.c ellik.c ellpe.c ellpj.c ellpk.c
  52. exp.c exp10.c exp2.c expn.c expx2.c fabs.c fac.c fdtr.c
  53. fresnl.c gamma.c gdtr.c hyp2f1.c hyperg.c i0.c i1.c igami.c incbet.c
  54. incbi.c igam.c isnan.c iv.c j0.c j1.c jn.c jv.c k0.c k1.c kn.c kolmogorov.c
  55. log.c log2.c log10.c lrand.c nbdtr.c ndtr.c ndtri.c pdtr.c planck.c
  56. polevl.c polmisc.c polylog.c polyn.c pow.c powi.c psi.c rgamma.c round.c
  57. shichi.c sici.c sin.c sindg.c sinh.c spence.c stdtr.c struve.c
  58. tan.c tandg.c tanh.c unity.c yn.c zeta.c zetac.c
  59. sqrt.c floor.c setprec.c mtherr.c ;
  60. DCDFLIB_SOURCE = dcdflib.c ipmpar.c ;
  61. path-constant here : . ;
  62. make $(here)/third_party/cephes_double/acosh.c : : @check_exists ;
  63. make $(here)/third_party/dcdflib/dcdflib.c : : @check_exists ;
  64. actions check_exists
  65. {
  66. stat $(<)
  67. }
  68. explicit $(here)/third_party/cephes_double/acosh.c ;
  69. explicit $(here)/third_party/dcdflib/dcdflib.c ;
  70. lib cephes_double : $(here)/third_party/cephes_double/$(CEPHES_SOURCE)
  71. :
  72. release
  73. <link>static
  74. [ check-target-builds $(here)/third_party/cephes_double/acosh.c : : <build>no ]
  75. ;
  76. explicit cephes_double ;
  77. lib dcdflib : $(here)/third_party/dcdflib/$(DCDFLIB_SOURCE)
  78. :
  79. release
  80. <link>static
  81. [ check-target-builds $(here)/third_party/dcdflib/dcdflib.c : : <build>no ]
  82. ;
  83. explicit dcdflib ;
  84. obj table_helper : table_helper.cpp ;
  85. rule all-tests {
  86. local result ;
  87. for local source in [ glob test*.cpp ]
  88. {
  89. result += [ run $(source) /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper
  90. : : : release <include>../../test
  91. [ check-target-builds ../accuracy//has_c99_cmath : <define>TEST_C99 ]
  92. [ check-target-builds ../accuracy//has_libstdcxx_tr1 : <define>TEST_LIBSTDCXX ]
  93. [ check-target-builds ../accuracy//has_gsl : <define>TEST_GSL <source>gsl <source>gslcblas ]
  94. [ check-target-builds ../accuracy//has_rmath : <define>TEST_RMATH <source>Rmath ]
  95. # [ check-target-builds is_intel_win : <build>no : ]
  96. [ check-target-builds $(here)/third_party/dcdflib/dcdflib.c : <define>TEST_DCDFLIB <source>dcdflib ]
  97. <target-os>linux:<linkflags>-lpthread <target-os>linux:<linkflags>-lrt
  98. #<toolset>msvc:<address-model>64
  99. ] ;
  100. }
  101. return $(result) ;
  102. }
  103. #
  104. # Special cases to test different compiler options,
  105. # cbrt first as an example of a trivial function:
  106. #
  107. run test_cbrt.cpp /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper
  108. : : : debug <define>COMPILER_COMPARISON_TABLES [ predef-require "BOOST_COMP_MSVC" ] <address-model>32 : test_cbrt_msvc_debug ;
  109. run test_cbrt.cpp /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper
  110. : : : release <define>COMPILER_COMPARISON_TABLES [ predef-require "BOOST_COMP_MSVC" ] <cxxflags>-Ox <address-model>32 : test_cbrt_msvc_release_32 ;
  111. run test_cbrt.cpp /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper
  112. : : : release <define>COMPILER_COMPARISON_TABLES [ predef-require "BOOST_COMP_MSVC" ] <cxxflags>-Ox <address-model>64 : test_cbrt_msvc_release_64 ;
  113. run test_cbrt.cpp /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper
  114. : : : release <define>COMPILER_COMPARISON_TABLES [ check-target-builds is_intel_win : : <build>no ] <toolset>intel:<cxxflags>-Ox <address-model>64 : test_cbrt_intel_release ;
  115. #
  116. # Now jn as a little more complex:
  117. #
  118. run test_jn.cpp /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper
  119. : : : debug <define>COMPILER_COMPARISON_TABLES <include>../../test [ predef-require "BOOST_COMP_MSVC" ] <address-model>32 : test_jn_msvc_debug ;
  120. run test_jn.cpp /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper
  121. : : : release <define>COMPILER_COMPARISON_TABLES <include>../../test [ predef-require "BOOST_COMP_MSVC" ] <cxxflags>-Ox <address-model>32 : test_jn_msvc_release_32 ;
  122. run test_jn.cpp /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper
  123. : : : release <define>COMPILER_COMPARISON_TABLES <include>../../test [ predef-require "BOOST_COMP_MSVC" ] <cxxflags>-Ox <address-model>64 : test_jn_msvc_release_64 ;
  124. run test_jn.cpp /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper
  125. : : : release <define>COMPILER_COMPARISON_TABLES <include>../../test [ check-target-builds is_intel_win : : <build>no ] <address-model>64 : test_jn_intel_release ;
  126. #
  127. # Then something really expensive, like the inverse-incomplete-beta:
  128. #
  129. run test_ibeta_inv.cpp /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper
  130. : : : debug <define>COMPILER_COMPARISON_TABLES <include>../../test [ predef-require "BOOST_COMP_MSVC" ] <address-model>32 : test_ibeta_inv_msvc_debug ;
  131. run test_ibeta_inv.cpp /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper
  132. : : : release <define>COMPILER_COMPARISON_TABLES <include>../../test [ predef-require "BOOST_COMP_MSVC" ] <cxxflags>-Ox <address-model>32 : test_ibeta_inv_msvc_release_32 ;
  133. run test_ibeta_inv.cpp /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper
  134. : : : release <define>COMPILER_COMPARISON_TABLES <include>../../test [ predef-require "BOOST_COMP_MSVC" ] <cxxflags>-Ox <address-model>64 : test_ibeta_inv_msvc_release_64 ;
  135. run test_ibeta_inv.cpp /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper
  136. : : : release <define>COMPILER_COMPARISON_TABLES <include>../../test [ check-target-builds is_intel_win : : <build>no ] <toolset>intel:<cxxflags>-Ox <address-model>64 : test_ibeta_inv_intel_release ;
  137. test-suite report_gen : [ all-tests ] test_cbrt_msvc_debug test_cbrt_msvc_release_32 test_cbrt_msvc_release_64 test_cbrt_intel_release
  138. test_jn_msvc_debug test_jn_msvc_release_32 test_jn_msvc_release_64 test_jn_intel_release test_ibeta_inv_msvc_debug
  139. test_ibeta_inv_msvc_release_32 test_ibeta_inv_msvc_release_64 test_ibeta_inv_intel_release ;
  140. path-constant images_location : html ;
  141. path-constant here : . ;
  142. xml report : doc/report.qbk : <dependency>report_gen ;
  143. boostbook standalone
  144. :
  145. report
  146. :
  147. # Path for links to Boost:
  148. <xsl:param>boost.root=../../../../..
  149. # Some general style settings:
  150. <xsl:param>table.footnote.number.format=1
  151. <xsl:param>footnote.number.format=1
  152. <xsl:param>html.stylesheet=boostbook.css
  153. # HTML options first:
  154. # Use graphics not text for navigation:
  155. <xsl:param>navig.graphics=1
  156. # How far down we chunk nested sections, basically all of them:
  157. <xsl:param>chunk.section.depth=0
  158. # Don't put the first section on the same page as the TOC:
  159. <xsl:param>chunk.first.sections=0
  160. # How far down sections get TOC's
  161. <xsl:param>toc.section.depth=2
  162. # Max depth in each TOC:
  163. <xsl:param>toc.max.depth=4
  164. # How far down we go with TOC's
  165. <xsl:param>generate.section.toc.level=10
  166. ;