Jamfile.v2 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. # Boost Chrono Library test Jamfile
  2. # Copyright Beman Dawes 2008
  3. # Copyright Vicente J. Botet Escriba 2009-2010
  4. # Distributed under the Boost Software License, Version 1.0.
  5. # See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt
  6. # See library home page at http://www.boost.org/libs/chrono
  7. import os ;
  8. import feature ;
  9. project
  10. : requirements
  11. <target-os>freebsd:<linkflags>"-lrt"
  12. <target-os>linux:<linkflags>"-lrt"
  13. <toolset>pgi:<linkflags>"-lrt"
  14. #<threading>single:<define>BOOST_CHRONO_THREAD_DISABLED
  15. <toolset>msvc:<asynch-exceptions>on
  16. <define>BOOST_CHRONO_USES_MPL_ASSERT
  17. <toolset>sun:<define>BOOST_TYPEOF_EMULATION
  18. <warnings>all
  19. <toolset>gcc:<cxxflags>-Wextra
  20. <toolset>gcc:<cxxflags>-pedantic
  21. <toolset>gcc:<cxxflags>-Wno-long-long
  22. <toolset>darwin:<cxxflags>-Wextra
  23. <toolset>darwin:<cxxflags>-pedantic
  24. <toolset>darwin:<cxxflags>-Wno-long-long
  25. #<toolset>pathscale:<cxxflags>-Wextra
  26. <toolset>pathscale:<cxxflags>-Wno-long-long
  27. <toolset>pathscale:<cxxflags>-pedantic
  28. <toolset>clang:<cxxflags>-Wextra
  29. <toolset>clang:<cxxflags>-pedantic
  30. <toolset>clang:<cxxflags>-Wno-long-long
  31. <toolset>gcc-4.5.0,<target-os>windows:<cxxflags>-Wno-missing-field-initializers
  32. <toolset>gcc-4.5.0,<target-os>windows:<cxxflags>-fdiagnostics-show-option
  33. <toolset>msvc:<cxxflags>/wd4127
  34. # Note: Some of the remarks from the Intel compiler are disabled
  35. # remark #304: access control not specified ("public" by default)
  36. # remark #383: value copied to temporary, reference to temporary used
  37. # remark #1418: external function definition with no prior declaration
  38. <toolset>intel:<cxxflags>-wd304,383,1418
  39. <define>BOOST_CHRONO_VERSION=2
  40. ;
  41. rule chrono-run ( sources )
  42. {
  43. return
  44. [ run $(sources) ../build//boost_chrono
  45. : :
  46. :
  47. : $(sources[1]:B)_shared ]
  48. [ run $(sources) ../build//boost_chrono/<link>static
  49. : :
  50. :
  51. : $(sources[1]:B)_static ]
  52. [ run $(sources)
  53. : :
  54. : <define>BOOST_CHRONO_HEADER_ONLY
  55. : $(sources[1]:B)_header ]
  56. ;
  57. }
  58. rule chrono-run2 ( sources : name )
  59. {
  60. return
  61. [ run $(sources) ../build//boost_chrono
  62. : :
  63. :
  64. : $(name)_shared ]
  65. [ run $(sources) ../build//boost_chrono/<link>static
  66. : :
  67. :
  68. : $(name)_static ]
  69. [ run $(sources)
  70. : :
  71. : <define>BOOST_CHRONO_HEADER_ONLY
  72. : $(name)_header ]
  73. ;
  74. }
  75. rule chrono-run-mt ( sources )
  76. {
  77. return
  78. [ run $(sources) ../build//boost_chrono
  79. : :
  80. :
  81. : $(sources[1]:B)_shared ]
  82. [ run $(sources) ../build//boost_chrono/<link>static
  83. : :
  84. :
  85. : $(sources[1]:B)_static ]
  86. [ run $(sources)
  87. : :
  88. : <define>BOOST_CHRONO_HEADER_ONLY
  89. : $(sources[1]:B)_header ]
  90. ;
  91. }
  92. rule chrono-run2-mt ( sources : name )
  93. {
  94. return
  95. [ run $(sources) ../build//boost_chrono
  96. : :
  97. :
  98. <library>/boost/system//boost_system
  99. : $(name)_shared ]
  100. [ run $(sources) ../build//boost_chrono/<link>static
  101. : :
  102. :
  103. <library>/boost/system//boost_system
  104. : $(name)_static ]
  105. [ run $(sources)
  106. : :
  107. : <define>BOOST_CHRONO_HEADER_ONLY
  108. : $(name)_header ]
  109. ;
  110. }
  111. rule chrono-compile ( sources )
  112. {
  113. return
  114. [ compile $(sources)
  115. :
  116. : $(sources[1]:B)_lib ]
  117. [ compile $(sources)
  118. : <define>BOOST_CHRONO_HEADER_ONLY
  119. : $(sources[1]:B)_header ]
  120. ;
  121. }
  122. rule chrono-compile2 ( sources : name )
  123. {
  124. return
  125. [ compile $(sources)
  126. :
  127. : $(name)_lib ]
  128. [ compile $(sources)
  129. : <define>BOOST_CHRONO_HEADER_ONLY
  130. : $(name)_header ]
  131. ;
  132. }
  133. test-suite "perf"
  134. :
  135. [ chrono-run store_now_in_vector.cpp ]
  136. ;