Jamfile.v2 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. ##############################################################################
  2. # Copyright 2005-2009 Andreas Huber Doenni
  3. # Distributed under the Boost Software License, Version 1.0. (See accompany-
  4. # ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. ##############################################################################
  6. project libs/statechart/test ;
  7. local test_monitor =
  8. ../../../libs/test/build//boost_test_exec_monitor/<link>static ;
  9. # Some platforms have either problems with the automatic detection of the
  10. # threading mode (e.g. vc-7_1 & gcc >= 3.4.0) or don't support single-
  11. # threaded mode (e.g. vc-8_0). We therefore manually turn MT off here
  12. local st-requirements = <define>BOOST_DISABLE_THREADS ;
  13. local dll = <define>BOOST_STATECHART_TEST_DYNAMIC_LINK ;
  14. local dll-export = $(dll) <define>BOOST_STATECHART_TEST_DLL_EXPORT ;
  15. local normal = ;
  16. local native = <define>BOOST_STATECHART_USE_NATIVE_RTTI ;
  17. local relaxed = <define>BOOST_STATECHART_RELAX_TRANSITION_CONTEXT ;
  18. local both = $(native) $(relaxed) ;
  19. rule independent-obj-build ( name : cpp-sources + : requirements * )
  20. {
  21. local objs ;
  22. for local cpp-source in $(cpp-sources)
  23. {
  24. obj $(name)$(cpp-source) : $(cpp-source).cpp : $(requirements) ;
  25. objs += $(name)$(cpp-source) ;
  26. }
  27. return $(objs) ;
  28. }
  29. rule statechart-st-lib ( name : cpp-sources + : requirements * )
  30. {
  31. local reqs =
  32. <threading>single $(st-requirements)
  33. <link>shared\:$(dll-export) $(requirements) ;
  34. lib $(name)
  35. : [ independent-obj-build $(name)
  36. : $(cpp-sources)
  37. : $(reqs) ] : $(reqs) ;
  38. return $(name) ;
  39. }
  40. rule statechart-run ( name : sources + : requirements * )
  41. {
  42. return [ run $(sources) $(test_monitor) : : : $(requirements) : $(name) ] ;
  43. }
  44. rule statechart-st-run ( name : sources + : requirements * )
  45. {
  46. return [ statechart-run $(name) : $(sources)
  47. : <threading>single $(st-requirements) $(requirements) ] ;
  48. }
  49. rule statechart-st-run-variants ( cpp-source )
  50. {
  51. local result ;
  52. result += [ statechart-st-run $(cpp-source)Normal
  53. : $(cpp-source).cpp : $(normal) ] ;
  54. result += [ statechart-st-run $(cpp-source)Native
  55. : $(cpp-source).cpp : $(native) ] ;
  56. result += [ statechart-st-run $(cpp-source)Relaxed
  57. : $(cpp-source).cpp : $(relaxed) ] ;
  58. result += [ statechart-st-run $(cpp-source)Both
  59. : $(cpp-source).cpp : $(both) ] ;
  60. return $(result) ;
  61. }
  62. rule statechart-compile-fail ( name : cpp-sources + : requirements * )
  63. {
  64. return [ compile-fail $(cpp-sources).cpp : $(requirements) : $(name) ] ;
  65. }
  66. rule statechart-compile-fail-variants ( cpp-source )
  67. {
  68. local result ;
  69. result += [ statechart-compile-fail $(cpp-source)Normal
  70. : $(cpp-source) : $(normal) ] ;
  71. result += [ statechart-compile-fail $(cpp-source)Native
  72. : $(cpp-source) : $(native) ] ;
  73. result += [ statechart-compile-fail $(cpp-source)Relaxed
  74. : $(cpp-source) : $(relaxed) ] ;
  75. result += [ statechart-compile-fail $(cpp-source)Both
  76. : $(cpp-source) : $(both) ] ;
  77. return $(result) ;
  78. }
  79. rule statechart-st-lib-run (
  80. name : exe-cpp-sources + : lib-cpp-sources + : requirements * )
  81. {
  82. return [ statechart-st-run $(name)
  83. : $(exe-cpp-sources).cpp
  84. [ statechart-st-lib $(name)Lib
  85. : $(lib-cpp-sources) : $(requirements) ]
  86. : <link>shared\:$(dll) $(requirements) ] ;
  87. }
  88. rule statechart-st-compile-example ( name : directory : cpp-sources + )
  89. {
  90. return [ link ../example/$(directory)/$(cpp-sources).cpp
  91. : <threading>single $(st-requirements) : $(name)Example ] ;
  92. }
  93. test-suite statechart
  94. : [ statechart-compile-fail-variants InvalidChartTest1 ]
  95. [ statechart-compile-fail-variants InvalidChartTest2 ]
  96. [ statechart-compile-fail-variants InvalidChartTest3 ]
  97. [ statechart-st-run-variants TransitionTest ]
  98. [ statechart-compile-fail-variants InvalidTransitionTest1 ]
  99. [ statechart-compile-fail-variants InvalidTransitionTest2 ]
  100. [ statechart-st-run-variants InStateReactionTest ]
  101. [ statechart-st-run-variants TerminationTest ]
  102. [ statechart-st-run-variants DeferralTest ]
  103. [ statechart-st-run-variants DeferralBug ]
  104. [ statechart-st-run-variants CustomReactionTest ]
  105. [ statechart-compile-fail-variants InvalidResultAssignTest ]
  106. [ statechart-compile-fail-variants InvalidResultDefCtorTest ]
  107. [ statechart-st-run-variants InvalidResultCopyTest ]
  108. [ statechart-st-run-variants UnconsumedResultTest ]
  109. [ statechart-st-run-variants HistoryTest ]
  110. [ statechart-compile-fail-variants InconsistentHistoryTest1 ]
  111. [ statechart-compile-fail-variants InconsistentHistoryTest2 ]
  112. [ statechart-compile-fail-variants InconsistentHistoryTest3 ]
  113. [ statechart-compile-fail-variants InconsistentHistoryTest4 ]
  114. [ statechart-compile-fail-variants InconsistentHistoryTest5 ]
  115. [ statechart-compile-fail-variants InconsistentHistoryTest6 ]
  116. [ statechart-compile-fail-variants InconsistentHistoryTest7 ]
  117. [ statechart-compile-fail-variants InconsistentHistoryTest8 ]
  118. [ statechart-compile-fail-variants UnsuppDeepHistoryTest ]
  119. [ statechart-st-run-variants StateCastTest ]
  120. [ statechart-st-run-variants TypeInfoTest ]
  121. [ statechart-st-run-variants StateIterationTest ]
  122. [ statechart-st-run-variants FifoSchedulerTest ]
  123. [ statechart-st-run-variants TriggeringEventTest ]
  124. [ statechart-st-lib-run LibTestNormal
  125. : TuTestMain : TuTest : <link>static $(normal) ]
  126. [ statechart-st-lib-run LibTestNative
  127. : TuTestMain : TuTest : <link>static $(native) ]
  128. [ statechart-st-lib-run DllTestNormal
  129. : TuTestMain : TuTest : <link>shared $(normal) ]
  130. [ statechart-st-lib-run DllTestNative
  131. : TuTestMain : TuTest : <link>shared $(native) ]
  132. [ statechart-st-compile-example BitMachine : BitMachine : BitMachine ]
  133. [ statechart-st-compile-example Camera
  134. : Camera : Camera Configuring Main Shooting ]
  135. [ statechart-st-compile-example Handcrafted : Handcrafted : Handcrafted ]
  136. [ statechart-st-compile-example Keyboard : Keyboard : Keyboard : ]
  137. [ statechart-st-compile-example Performance : Performance : Performance ]
  138. [ statechart-st-compile-example PingPong : PingPong : PingPong Player ]
  139. [ statechart-st-compile-example StopWatch : StopWatch : StopWatch ]
  140. [ statechart-st-compile-example StopWatch2 : StopWatch : StopWatch2 ] ;