1 # Boost Chrono Library test Jamfile
3 # Copyright Beman Dawes 2008
4 # Copyright Vicente J. Botet Escriba 2009-2010
6 # Distributed under the Boost Software License, Version 1.0.
7 # See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt
9 # See library home page at http://www.boost.org/libs/chrono
17 <target-os>freebsd:<linkflags>"-lrt"
18 <target-os>linux:<linkflags>"-lrt -lpthread"
19 <toolset>clang/<target-os>linux:<linkflags>"-lpthread"
20 <toolset>pgi:<linkflags>"-lrt"
21 #<threading>single:<define>BOOST_CHRONO_THREAD_DISABLED
22 <toolset>msvc:<asynch-exceptions>on
23 <define>BOOST_CHRONO_USES_MPL_ASSERT
24 <define>BOOST_SYSTEM_NO_DEPRECATED
25 #<toolset>sun:<define>BOOST_COMMON_TYPE_DONT_USE_TYPEOF
26 #<toolset>sun:<define>BOOST_TYPEOF_EMULATION
27 <toolset>sun:<define>__typeof__=__typeof__
29 <toolset>gcc:<cxxflags>-Wextra
30 #<toolset>gcc:<cxxflags>-pedantic
31 <toolset>clang:<warnings>on
32 <toolset>gcc:<cxxflags>-Wno-long-long
33 <toolset>gcc:<cxxflags>-Wno-variadic-macros
34 <toolset>darwin:<cxxflags>-Wextra
35 <toolset>darwin:<cxxflags>-pedantic
36 <toolset>darwin:<cxxflags>-Wno-long-long
37 <toolset>darwin:<cxxflags>-Wno-variadic-macros
38 #<toolset>pathscale:<cxxflags>-Wextra
39 <toolset>pathscale:<cxxflags>-Wno-long-long
40 <toolset>pathscale:<cxxflags>-pedantic
41 <toolset>clang:<cxxflags>-Wextra
42 <toolset>clang:<cxxflags>-pedantic
43 <toolset>clang:<cxxflags>-Wno-long-long
44 <toolset>clang:<cxxflags>-Wno-variadic-macros
45 <toolset>gcc-4.5.0,<target-os>windows:<cxxflags>-Wno-missing-field-initializers
46 <toolset>gcc-4.5.0,<target-os>windows:<cxxflags>-fdiagnostics-show-option
47 <toolset>msvc:<cxxflags>/wd4127
48 <toolset>msvc:<cxxflags>/wd4512
49 # Note: Some of the remarks from the Intel compiler are disabled
50 # remark #193: zero used for undefined preprocessing identifier "XXX"
51 # remark #304: access control not specified ("public" by default)
52 # remark #383: value copied to temporary, reference to temporary used
53 # remark #444: destructor for base class "XXX" (declared at line YYY") is not virtual
54 # remark #593: variable "XXX" was set but never used
55 # remark #981: operands are evaluated in unspecified order
56 # remark #1418: external function definition with no prior declaration
57 # remark #2415: variable "XXX" of static storage duration was declared but never referenced
59 <toolset>intel:<cxxflags>-wd193,304,383,444
60 <toolset>intel:<cxxflags>-wd593,981
61 <toolset>intel:<cxxflags>-wd1418
62 <toolset>intel:<cxxflags>-wd2415
65 rule chrono-run ( sources )
68 [ run $(sources) ../build//boost_chrono
71 <library>/boost/system//boost_system
72 <define>BOOST_CHRONO_VERSION=2
74 #[ run $(sources) ../build//boost_chrono/<link>static
77 # <library>/boost/system//boost_system/<link>static
78 # : $(sources[1]:B)_s ]
81 : <define>BOOST_CHRONO_HEADER_ONLY
82 <define>BOOST_ERROR_CODE_HEADER_ONLY
83 #<define>BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
84 <define>BOOST_CHRONO_VERSION=2
89 rule chrono-runXXX ( sources )
92 [ run $(sources) ../build//boost_chrono
95 <library>/boost/system//boost_system
96 <define>BOOST_CHRONO_VERSION=2
98 #[ run $(sources) ../build//boost_chrono/<link>static
101 # <library>/boost/system//boost_system/<link>static
102 # : $(sources[1]:B)_s ]
105 : <define>BOOST_CHRONO_HEADER_ONLY
106 <define>BOOST_ERROR_CODE_HEADER_ONLY
107 <define>BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
108 <define>BOOST_CHRONO_VERSION=2
109 : $(sources[1]:B)_h ]
114 rule chrono-v1-v2-run ( sources )
117 [ run $(sources) ../build//boost_chrono
120 <library>/boost/system//boost_system
121 <define>BOOST_CHRONO_VERSION=2
122 : $(sources[1]:B)_d ]
123 [ run $(sources) ../build//boost_chrono/<link>static
126 <library>/boost/system//boost_system/<link>static
127 : v1_$(sources[1]:B)_s ]
130 : <define>BOOST_CHRONO_HEADER_ONLY
131 <define>BOOST_ERROR_CODE_HEADER_ONLY
132 #<define>BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
133 <define>BOOST_CHRONO_VERSION=2
134 : $(sources[1]:B)_h ]
137 : <define>BOOST_CHRONO_HEADER_ONLY
138 <define>BOOST_ERROR_CODE_HEADER_ONLY
139 #<define>BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
140 #<define>BOOST_CHRONO_VERSION=1
141 : v1_$(sources[1]:B)_h ]
145 rule chrono-run2 ( sources : name )
148 [ run $(sources) ../build//boost_chrono
151 <library>/boost/system//boost_system
152 <define>BOOST_CHRONO_VERSION=2
154 #[ run $(sources) ../build//boost_chrono/<link>static
157 # <library>/boost/system//boost_system/<link>static
161 : <define>BOOST_CHRONO_HEADER_ONLY
162 <define>BOOST_ERROR_CODE_HEADER_ONLY
163 #<define>BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
164 <define>BOOST_CHRONO_VERSION=2
169 rule date-run ( sources + )
172 [ run $(sources) ../build//boost_chrono
175 <library>/boost/system//boost_system
176 <define>BOOST_CHRONO_VERSION=2
177 : $(sources[1]:B)_d ]
181 rule date-run-2 ( sources + : name )
184 [ run $(sources) ../build//boost_chrono
187 <library>/boost/system//boost_system
188 <define>BOOST_CHRONO_VERSION=2
194 rule chrono-run-mt ( sources )
197 [ run $(sources) ../build//boost_chrono
200 <library>/boost/system//boost_system
201 <define>BOOST_CHRONO_VERSION=2
202 : $(sources[1]:B)_d ]
203 #[ run $(sources) ../build//boost_chrono/<link>static
206 # <library>/boost/system//boost_system/<link>static
207 # : $(sources[1]:B)_s ]
210 : <define>BOOST_CHRONO_HEADER_ONLY
211 <define>BOOST_ERROR_CODE_HEADER_ONLY
212 #<define>BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
213 <define>BOOST_CHRONO_VERSION=2
214 : $(sources[1]:B)_h ]
217 rule chrono-run2-mt ( sources * : name )
220 [ run $(sources) ../build//boost_chrono
223 <library>/boost/system//boost_system
224 <define>BOOST_CHRONO_VERSION=2
226 #[ run $(sources) ../build//boost_chrono/<link>static
229 # <library>/boost/system//boost_system/<link>static
233 : <define>BOOST_CHRONO_HEADER_ONLY
234 <define>BOOST_ERROR_CODE_HEADER_ONLY
235 #<define>BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
236 <define>BOOST_CHRONO_VERSION=2
241 rule chrono-run-check ( sources )
247 <library>/boost/system//boost_system
248 <define>BOOST_CHRONO_VERSION=2
249 : $(sources[1]:B)_d ]
253 <library>/boost/system//boost_system/<link>static
254 <define>BOOST_CHRONO_VERSION=2
255 : $(sources[1]:B)_s ]
258 : <define>BOOST_CHRONO_HEADER_ONLY
259 <define>BOOST_ERROR_CODE_HEADER_ONLY
260 #<define>BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
261 <define>BOOST_CHRONO_VERSION=2
262 : $(sources[1]:B)_h ]
266 rule chrono-run-check2 ( sources : name )
272 <library>/boost/system//boost_system
273 <define>BOOST_CHRONO_VERSION=2
278 <library>/boost/system//boost_system/<link>static
279 <define>BOOST_CHRONO_VERSION=2
283 : <define>BOOST_CHRONO_HEADER_ONLY
284 <define>BOOST_ERROR_CODE_HEADER_ONLY
285 #<define>BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
286 <define>BOOST_CHRONO_VERSION=2
291 rule chrono-run-header ( sources )
296 : <define>BOOST_CHRONO_HEADER_ONLY
297 <define>BOOST_ERROR_CODE_HEADER_ONLY
298 #<define>BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
299 <define>BOOST_CHRONO_VERSION=2
300 : $(sources[1]:B)_h ]
304 rule chrono-v1-v2-run-header ( sources )
309 : <define>BOOST_CHRONO_HEADER_ONLY
310 <define>BOOST_ERROR_CODE_HEADER_ONLY
311 #<define>BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
312 <define>BOOST_CHRONO_VERSION=2
313 : $(sources[1]:B)_h ]
316 : <define>BOOST_CHRONO_HEADER_ONLY
317 <define>BOOST_ERROR_CODE_HEADER_ONLY
318 #<define>BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
319 : v1_$(sources[1]:B)_h ]
323 rule chrono-run-header2 ( sources : name )
328 : <define>BOOST_CHRONO_HEADER_ONLY
329 <define>BOOST_ERROR_CODE_HEADER_ONLY
330 #<define>BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
331 <define>BOOST_CHRONO_VERSION=2
336 rule chrono-compile ( sources )
341 <define>BOOST_CHRONO_VERSION=2
342 : $(sources[1]:B)_l ]
344 : <define>BOOST_CHRONO_HEADER_ONLY
345 <define>BOOST_ERROR_CODE_HEADER_ONLY
346 #<define>BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
347 <define>BOOST_CHRONO_VERSION=2
348 : $(sources[1]:B)_h ]
352 rule chrono-compile2 ( sources : name )
357 <define>BOOST_CHRONO_VERSION=2
360 : <define>BOOST_CHRONO_HEADER_ONLY
361 <define>BOOST_ERROR_CODE_HEADER_ONLY
362 #<define>BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
363 <define>BOOST_CHRONO_VERSION=2
369 test-suite "examples"
371 [ chrono-run-header ../example/cycle_count.cpp ]
372 [ chrono-run-header ../example/runtime_resolution.cpp ]
373 [ chrono-run-header ../example/xtime.cpp ]
374 [ chrono-run-header ../example/saturating.cpp ]
375 [ chrono-run ../example/min_time_point.cpp ]
376 [ chrono-run-header ../example/i_dont_like_the_default_duration_behavior.cpp ]
377 [ chrono-run ../example/simulated_thread_interface_demo.cpp ]
378 [ chrono-run-header ../example/timeval_demo.cpp ]
379 [ chrono-run ../example/chrono_unit_test.cpp ]
380 [ chrono-run-header ../example/explore_limits.cpp ]
381 [ chrono-run-header ../example/test_duration.cpp ]
382 [ chrono-run ../example/test_clock.cpp ]
383 [ chrono-run-header ../example/miscellaneous.cpp ]
384 [ chrono-run-header ../example/test_special_values.cpp ]
385 [ chrono-run ../example/manipulate_clock_object.cpp ]
386 #[ chrono-run ../example/chrono_accuracy_test.cpp ]
387 [ chrono-run-mt ../example/test_thread_clock.cpp ]
388 [ chrono-run-header ../example/rounding.cpp ]
389 #[ chrono-run ../example/await_keystroke.cpp ]
394 [ chrono-compile2 traits/common_type_duration_pass.cpp : traits_common_type_duration_p ]
395 [ chrono-compile2 traits/common_type_time_point_pass.cpp : traits_common_type_time_point_p ]
396 [ chrono-compile2 traits/treat_as_floating_point_pass.cpp : traits_treat_as_floating_point_p ]
397 [ chrono-run-header2 traits/duration_values_pass.cpp : traits_duration_values_p ]
400 test-suite "duration"
402 [ compile-fail duration/duration_duration_fail.cpp ]
403 [ compile-fail duration/ratio_fail.cpp ]
404 [ compile-fail duration/positive_num_fail.cpp ]
405 [ chrono-compile duration/default_ratio_pass.cpp ]
406 [ chrono-compile duration/types_pass.cpp ]
407 [ chrono-compile duration/ratio_alias_pass.cpp ]
408 [ chrono-compile duration/typedefs_pass.cpp ]
409 [ chrono-run-header duration/arithmetic_pass.cpp ]
410 [ chrono-run-header duration/duration_cast_pass.cpp ]
411 [ compile-fail duration/duration_cast_int_fail.cpp ]
412 [ chrono-run-header duration/comparisons_pass.cpp ]
413 [ chrono-run-header duration/constructor_pass.cpp ]
414 [ compile-fail duration/cons/convert_float_to_int_fail.cpp ]
415 [ compile-fail duration/cons/convert_inexact_fail.cpp ]
416 [ compile-fail duration/cons/implicit_constructot_fail.cpp ]
417 [ compile-fail duration/cons/non_implicit_convertible_rep_fail.cpp ]
418 [ compile-fail duration/cons/treat_as_floating_point_Rep2_true_fail.cpp ]
419 [ compile-fail duration/nonmember/divide_rep2_fail.cpp ]
420 [ compile-fail duration/nonmember/modulus_rep2_fail.cpp ]
421 [ compile-fail duration/nonmember/times_rep2_lhs_fail.cpp ]
422 [ compile-fail duration/nonmember/times_rep2_rhs_fail.cpp ]
423 [ chrono-run-header duration/duration_values_pass.cpp ]
424 [ chrono-run-header duration/rounding_pass.cpp ]
427 test-suite "time_point"
429 [ chrono-compile2 time_point/default_duration_pass.cpp : time_point_default_duration_p ]
430 [ compile-fail time_point/not_duration_fail.cpp : : time_point_not_duration_f ]
431 [ chrono-run-header2 time_point/arithmetic_pass.cpp : time_point_arithmetic_p ]
432 [ chrono-run-header2 time_point/arithmetic_ext_pass.cpp : time_point_arithmetic_ext_p ]
433 [ chrono-run-header2 time_point/time_point_cast_pass.cpp : time_point_time_point_cast_p ]
434 [ compile-fail time_point/time_point_cast_int_fail.cpp : : time_point_time_point_cast_int_f ]
435 [ chrono-run-header2 time_point/comparisons_pass.cpp : time_point_comparisons_p ]
436 [ compile-fail time_point/comparisons/equal_fail.cpp : : time_point_equal_f ]
437 [ compile-fail time_point/comparisons/less_fail.cpp : : time_point_less_f ]
438 [ chrono-run-header2 time_point/constructor_pass.cpp : time_point_constructor_p ]
439 [ compile-fail time_point/cons/implicit_fail.cpp : : time_point_implicit_f ]
440 [ compile-fail time_point/cons/non_implicit_convertible_duration_fail.cpp : : time_point_non_implicit_convertible_duration_f ]
441 [ chrono-run-header2 time_point/min_max_pass.cpp : time_point_min_max_p ]
446 [ chrono-run2-mt clock/clock_pass.cpp : clock_clock_p ]
447 [ chrono-run2-mt one_obj.cpp another_obj.cpp : two_obj_p ]
452 [ chrono-v1-v2-run ../example/io_ex1.cpp ]
453 [ chrono-v1-v2-run-header ../example/io_ex2.cpp ]
454 [ chrono-v1-v2-run ../example/io_ex3.cpp ]
455 [ chrono-v1-v2-run ../example/io_ex4.cpp ]
456 [ chrono-v1-v2-run ../example/io_ex5.cpp ]
457 [ chrono-v1-v2-run ../example/french.cpp ]
462 [ chrono-v1-v2-run-header io/duration_input.cpp ]
463 [ chrono-v1-v2-run-header io/duration_output.cpp ]
464 [ chrono-v1-v2-run-header io/time_point_input.cpp ]
465 [ chrono-v1-v2-run-header io/time_point_output.cpp ]
466 [ chrono-run test_7868.cpp ]
467 [ chrono-run test_11006.cpp ]
468 [ chrono-run test_11012.cpp ]
469 [ chrono-runXXX test_12176.cpp ]
474 [ chrono-run win32_test.cpp ]
480 #[ chrono-run test_7868.cpp ]
481 #[ chrono-run test_9337.cpp ]
482 #[ chrono-run test_10778.cpp ]
483 [ chrono-run test_10631.cpp ]