Jamfile.v2 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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. project
  18. : requirements
  19. <include>../../include_private
  20. ;
  21. if $(is_unix)
  22. {
  23. local osname = [ SHELL uname ] ;
  24. switch $(osname)
  25. {
  26. case "Sun*" : OTHERFLAGS = "-lpthread -lrt" ;
  27. case "*BSD*" : OTHERFLAGS = "-lpthread" ;
  28. }
  29. }
  30. #
  31. # Configuration first:
  32. #
  33. lib gsl ;
  34. lib gslcblas ;
  35. lib Rmath ;
  36. obj has_cxx17_cmath : has_cxx17_cmath.cpp ;
  37. explicit has_cxx17_cmath ;
  38. obj has_c99_cmath : has_c99_cmath.cpp ;
  39. explicit has_c99_cmath ;
  40. exe has_gsl : has_gsl.cpp gsl gslcblas ;
  41. explicit has_gsl ;
  42. exe has_rmath : has_rmath.cpp Rmath ;
  43. explicit has_rmath ;
  44. CEPHES_SOURCE = acosh.c airy.c asin.c asinh.c atan.c atanh.c bdtr.c beta.c
  45. btdtr.c cbrt.c chbevl.c chdtr.c clog.c cmplx.c const.c
  46. cosh.c dawsn.c drand.c ei.c ellie.c ellik.c ellpe.c ellpj.c ellpk.c
  47. exp.c exp10.c exp2.c expn.c expx2.c fabs.c fac.c fdtr.c
  48. fresnl.c gamma.c gdtr.c hyp2f1.c hyperg.c i0.c i1.c igami.c incbet.c
  49. incbi.c igam.c isnan.c iv.c j0.c j1.c jn.c jv.c k0.c k1.c kn.c kolmogorov.c
  50. log.c log2.c log10.c lrand.c nbdtr.c ndtr.c ndtri.c pdtr.c planck.c
  51. polevl.c polmisc.c polylog.c polyn.c pow.c powi.c psi.c rgamma.c round.c
  52. shichi.c sici.c sin.c sindg.c sinh.c spence.c stdtr.c struve.c
  53. tan.c tandg.c tanh.c unity.c yn.c zeta.c zetac.c
  54. sqrt.c floor.c setprec.c mtherr.c ;
  55. path-constant here : . ;
  56. make $(here)/third_party/cephes_double/acosh.c : : @check_exists ;
  57. actions check_exists
  58. {
  59. stat $(<)
  60. }
  61. explicit $(here)/third_party/cephes_double/acosh.c ;
  62. lib cephes_double : $(here)/third_party/cephes_double/$(CEPHES_SOURCE)
  63. :
  64. release
  65. <link>static
  66. [ check-target-builds $(here)/third_party/cephes_double/acosh.c : : <build>no ]
  67. ;
  68. explicit cephes_double ;
  69. rule all-tests {
  70. local result ;
  71. for local source in [ glob test*.cpp ]
  72. {
  73. result += [ run $(source) /boost/regex//boost_regex /boost/system /boost/filesystem /boost/test//boost_unit_test_framework
  74. : : :
  75. [ check-target-builds has_gsl : <define>ALWAYS_TEST_DOUBLE : ]
  76. <target-os>linux:<linkflags>-lpthread
  77. <target-os>linux:<linkflags>-lrt
  78. <toolset>gcc:<linkflags>$(OTHERFLAGS) ]
  79. ;
  80. result += [ run $(source) /boost/regex//boost_regex /boost/system /boost/filesystem /boost/test//boost_unit_test_framework
  81. : : : [ check-target-builds has_cxx17_cmath : <define>TEST_CXX17_CMATH : <build>no ]
  82. <target-os>linux:<linkflags>-lpthread
  83. <target-os>linux:<linkflags>-lrt
  84. <toolset>gcc:<linkflags>$(OTHERFLAGS)
  85. : $(source:B)_cxx17_cmath ]
  86. ;
  87. result += [ run $(source) /boost/regex//boost_regex /boost/system /boost/filesystem /boost/test//boost_unit_test_framework
  88. : : : [ check-target-builds has_c99_cmath : <define>TEST_C99 : <build>no ]
  89. <target-os>linux:<linkflags>-lpthread
  90. <target-os>linux:<linkflags>-lrt
  91. <toolset>gcc:<linkflags>$(OTHERFLAGS)
  92. : $(source:B)_c99 ]
  93. ;
  94. result += [ run $(source) /boost/regex//boost_regex /boost/system /boost/filesystem /boost/test//boost_unit_test_framework gsl gslcblas
  95. : : : [ check-target-builds has_gsl : <define>TEST_GSL : <build>no ]
  96. <target-os>linux:<linkflags>-lpthread
  97. <target-os>linux:<linkflags>-lrt
  98. <toolset>gcc:<linkflags>$(OTHERFLAGS)
  99. : $(source:B)_gsl ]
  100. ;
  101. result += [ run $(source) /boost/regex//boost_regex /boost/system /boost/filesystem /boost/test//boost_unit_test_framework Rmath
  102. : : : [ check-target-builds has_rmath : <define>TEST_RMATH : <build>no ]
  103. <target-os>linux:<linkflags>-lpthread
  104. <target-os>linux:<linkflags>-lrt
  105. <toolset>gcc:<linkflags>$(OTHERFLAGS)
  106. : $(source:B)_rmath ]
  107. ;
  108. result += [ run $(source) /boost/regex//boost_regex /boost/system /boost/filesystem /boost/test//boost_unit_test_framework cephes_double
  109. : : : [ check-target-builds $(here)/third_party/cephes_double/acosh.c : <define>TEST_CEPHES <source>cephes_double : <build>no ]
  110. <target-os>linux:<linkflags>-lpthread
  111. <target-os>linux:<linkflags>-lrt
  112. <toolset>gcc:<linkflags>$(OTHERFLAGS)
  113. : $(source:B)_cephes ]
  114. ;
  115. }
  116. return $(result) ;
  117. }
  118. test-suite report_gen : [ all-tests ] ;
  119. path-constant images_location : html ;
  120. path-constant here : . ;
  121. xml report : doc/report.qbk : <dependency>report_gen ;
  122. boostbook standalone
  123. :
  124. report
  125. :
  126. # Path for links to Boost:
  127. <xsl:param>boost.root=../../../../..
  128. # Some general style settings:
  129. <xsl:param>table.footnote.number.format=1
  130. <xsl:param>footnote.number.format=1
  131. <xsl:param>html.stylesheet=http://www.boost.org/doc/libs/1_58_0/doc/src/boostbook.css
  132. # HTML options first:
  133. # Use graphics not text for navigation:
  134. <xsl:param>navig.graphics=1
  135. # How far down we chunk nested sections, basically all of them:
  136. <xsl:param>chunk.section.depth=0
  137. # Don't put the first section on the same page as the TOC:
  138. <xsl:param>chunk.first.sections=0
  139. # How far down sections get TOC's
  140. <xsl:param>toc.section.depth=2
  141. # Max depth in each TOC:
  142. <xsl:param>toc.max.depth=4
  143. # How far down we go with TOC's
  144. <xsl:param>generate.section.toc.level=10
  145. ;