]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/chrono/test/Jamfile.v2
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / chrono / test / Jamfile.v2
1 # Boost Chrono Library test Jamfile
2
3 # Copyright Beman Dawes 2008
4 # Copyright Vicente J. Botet Escriba 2009-2010
5
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
8
9 # See library home page at http://www.boost.org/libs/chrono
10
11 import testing ;
12 import os ;
13 import feature ;
14
15 project
16 : requirements
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__
28 <warnings>all
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
58
59 <toolset>intel:<cxxflags>-wd193,304,383,444
60 <toolset>intel:<cxxflags>-wd593,981
61 <toolset>intel:<cxxflags>-wd1418
62 <toolset>intel:<cxxflags>-wd2415
63 ;
64
65 rule chrono-run ( sources )
66 {
67 return
68 [ run $(sources) ../build//boost_chrono
69 : :
70 :
71 <library>/boost/system//boost_system
72 <define>BOOST_CHRONO_VERSION=2
73 : $(sources[1]:B)_d ]
74 #[ run $(sources) ../build//boost_chrono/<link>static
75 # : :
76 # :
77 # <library>/boost/system//boost_system/<link>static
78 # : $(sources[1]:B)_s ]
79 [ run $(sources)
80 : :
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
85 : $(sources[1]:B)_h ]
86 ;
87 }
88
89 rule chrono-runXXX ( sources )
90 {
91 return
92 [ run $(sources) ../build//boost_chrono
93 : :
94 :
95 <library>/boost/system//boost_system
96 <define>BOOST_CHRONO_VERSION=2
97 : $(sources[1]:B)_d ]
98 #[ run $(sources) ../build//boost_chrono/<link>static
99 # : :
100 # :
101 # <library>/boost/system//boost_system/<link>static
102 # : $(sources[1]:B)_s ]
103 [ run $(sources)
104 : :
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 ]
110 ;
111 }
112
113
114 rule chrono-v1-v2-run ( sources )
115 {
116 return
117 [ run $(sources) ../build//boost_chrono
118 : :
119 :
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
124 : :
125 :
126 <library>/boost/system//boost_system/<link>static
127 : v1_$(sources[1]:B)_s ]
128 [ run $(sources)
129 : :
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 ]
135 [ run $(sources)
136 : :
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 ]
142 ;
143 }
144
145 rule chrono-run2 ( sources : name )
146 {
147 return
148 [ run $(sources) ../build//boost_chrono
149 : :
150 :
151 <library>/boost/system//boost_system
152 <define>BOOST_CHRONO_VERSION=2
153 : $(name)_d ]
154 #[ run $(sources) ../build//boost_chrono/<link>static
155 # : :
156 # :
157 # <library>/boost/system//boost_system/<link>static
158 # : $(name)_s ]
159 [ run $(sources)
160 : :
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
165 : $(name)_h ]
166 ;
167 }
168
169 rule date-run ( sources + )
170 {
171 return
172 [ run $(sources) ../build//boost_chrono
173 : :
174 :
175 <library>/boost/system//boost_system
176 <define>BOOST_CHRONO_VERSION=2
177 : $(sources[1]:B)_d ]
178 ;
179 }
180
181 rule date-run-2 ( sources + : name )
182 {
183 return
184 [ run $(sources) ../build//boost_chrono
185 : :
186 :
187 <library>/boost/system//boost_system
188 <define>BOOST_CHRONO_VERSION=2
189 : $(name)_d ]
190 ;
191 }
192
193
194 rule chrono-run-mt ( sources )
195 {
196 return
197 [ run $(sources) ../build//boost_chrono
198 : :
199 :
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
204 # : :
205 # :
206 # <library>/boost/system//boost_system/<link>static
207 # : $(sources[1]:B)_s ]
208 [ run $(sources)
209 : :
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 ]
215 ;
216 }
217 rule chrono-run2-mt ( sources * : name )
218 {
219 return
220 [ run $(sources) ../build//boost_chrono
221 : :
222 :
223 <library>/boost/system//boost_system
224 <define>BOOST_CHRONO_VERSION=2
225 : $(name)_d ]
226 #[ run $(sources) ../build//boost_chrono/<link>static
227 # : :
228 # :
229 # <library>/boost/system//boost_system/<link>static
230 # : $(name)_s ]
231 [ run $(sources)
232 : :
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
237 : $(name)_h ]
238 ;
239 }
240
241 rule chrono-run-check ( sources )
242 {
243 return
244 [ run $(sources)
245 : :
246 :
247 <library>/boost/system//boost_system
248 <define>BOOST_CHRONO_VERSION=2
249 : $(sources[1]:B)_d ]
250 [ run $(sources)
251 : :
252 :
253 <library>/boost/system//boost_system/<link>static
254 <define>BOOST_CHRONO_VERSION=2
255 : $(sources[1]:B)_s ]
256 [ run $(sources)
257 : :
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 ]
263 ;
264 }
265
266 rule chrono-run-check2 ( sources : name )
267 {
268 return
269 [ run $(sources)
270 : :
271 :
272 <library>/boost/system//boost_system
273 <define>BOOST_CHRONO_VERSION=2
274 : $(name)_d ]
275 [ run $(sources)
276 : :
277 :
278 <library>/boost/system//boost_system/<link>static
279 <define>BOOST_CHRONO_VERSION=2
280 : $(name)_s ]
281 [ run $(sources)
282 : :
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
287 : $(name)_h ]
288 ;
289 }
290
291 rule chrono-run-header ( sources )
292 {
293 return
294 [ run $(sources)
295 : :
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 ]
301 ;
302 }
303
304 rule chrono-v1-v2-run-header ( sources )
305 {
306 return
307 [ run $(sources)
308 : :
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 ]
314 [ run $(sources)
315 : :
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 ]
320 ;
321 }
322
323 rule chrono-run-header2 ( sources : name )
324 {
325 return
326 [ run $(sources)
327 : :
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
332 : $(name)_h ]
333 ;
334 }
335
336 rule chrono-compile ( sources )
337 {
338 return
339 [ compile $(sources)
340 :
341 <define>BOOST_CHRONO_VERSION=2
342 : $(sources[1]:B)_l ]
343 [ compile $(sources)
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 ]
349 ;
350 }
351
352 rule chrono-compile2 ( sources : name )
353 {
354 return
355 [ compile $(sources)
356 :
357 <define>BOOST_CHRONO_VERSION=2
358 : $(name)_l ]
359 [ compile $(sources)
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
364 : $(name)_h ]
365 ;
366 }
367
368
369 test-suite "examples"
370 :
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 ]
390 ;
391
392 test-suite "traits"
393 :
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 ]
398 ;
399
400 test-suite "duration"
401 :
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 ]
425 ;
426
427 test-suite "time_point"
428 :
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 ]
442 ;
443
444 test-suite "clock"
445 :
446 [ chrono-run2-mt clock/clock_pass.cpp : clock_clock_p ]
447 [ chrono-run2-mt one_obj.cpp another_obj.cpp : two_obj_p ]
448 ;
449
450 test-suite "io_ex"
451 :
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 ]
458 ;
459
460 test-suite "io"
461 :
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 ]
470 ;
471
472 test-suite "win32"
473 :
474 [ chrono-run win32_test.cpp ]
475 ;
476
477 explicit ts_ ;
478 test-suite ts_
479 :
480 #[ chrono-run test_7868.cpp ]
481 #[ chrono-run test_9337.cpp ]
482 #[ chrono-run test_10778.cpp ]
483 [ chrono-run test_10631.cpp ]
484 ;
485