| # Boost Chrono Library test Jamfile |
| |
| # Copyright Beman Dawes 2008 |
| # Copyright Vicente J. Botet Escriba 2009-2010 |
| |
| # Distributed under the Boost Software License, Version 1.0. |
| # See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt |
| |
| # See library home page at http://www.boost.org/libs/chrono |
| |
| import os ; |
| import feature ; |
| |
| project |
| : requirements |
| <target-os>freebsd:<threading>multi |
| <target-os>linux:<threading>multi |
| <toolset>pgi:<threading>multi |
| <toolset>msvc:<asynch-exceptions>on |
| <define>BOOST_CHRONO_USES_MPL_ASSERT |
| <define>BOOST_SYSTEM_NO_DEPRECATED |
| <toolset>sun:<define>BOOST_TYPEOF_EMULATION |
| <warnings>all |
| <toolset>gcc:<cxxflags>-Wextra |
| <toolset>gcc:<cxxflags>-pedantic |
| <toolset>gcc:<cxxflags>-Wno-long-long |
| <toolset>darwin:<cxxflags>-Wextra |
| <toolset>darwin:<cxxflags>-pedantic |
| <toolset>darwin:<cxxflags>-Wno-long-long |
| #<toolset>pathscale:<cxxflags>-Wextra |
| <toolset>pathscale:<cxxflags>-Wno-long-long |
| <toolset>pathscale:<cxxflags>-pedantic |
| <toolset>clang:<cxxflags>-Wextra |
| <toolset>clang:<cxxflags>-pedantic |
| <toolset>clang:<cxxflags>-Wno-long-long |
| <toolset>gcc-mingw-4.5.0:<cxxflags>-Wno-missing-field-initializers |
| <toolset>gcc-mingw-4.5.0:<cxxflags>-fdiagnostics-show-option |
| <toolset>msvc:<cxxflags>/wd4127 |
| # Note: Some of the remarks from the Intel compiler are disabled |
| # remark #304: access control not specified ("public" by default) |
| # remark #383: value copied to temporary, reference to temporary used |
| # remark #1418: external function definition with no prior declaration |
| <toolset>intel:<cxxflags>-wd304,383,1418 |
| ; |
| |
| rule chrono-run ( sources ) |
| { |
| return |
| [ run $(sources) ../build//boost_chrono |
| : : |
| : |
| <library>/boost/system//boost_system |
| : $(sources[1]:B)_shared ] |
| [ run $(sources) ../build//boost_chrono/<link>static |
| : : |
| : |
| <library>/boost/system//boost_system |
| : $(sources[1]:B)_static ] |
| [ run $(sources) |
| : : |
| : <define>BOOST_CHRONO_HEADER_ONLY |
| # comment one of the following lines |
| #<define>BOOST_SYSTEM_INLINED |
| <library>/boost/system//boost_system |
| : $(sources[1]:B)_header ] |
| ; |
| } |
| rule chrono-run2 ( sources : name ) |
| { |
| return |
| [ run $(sources) ../build//boost_chrono |
| : : |
| : |
| <library>/boost/system//boost_system |
| : $(name)_shared ] |
| [ run $(sources) ../build//boost_chrono/<link>static |
| : : |
| : |
| <library>/boost/system//boost_system |
| : $(name)_static ] |
| [ run $(sources) |
| : : |
| : <define>BOOST_CHRONO_HEADER_ONLY |
| # comment one of the following lines |
| #<define>BOOST_SYSTEM_INLINED |
| <library>/boost/system//boost_system |
| : $(name)_header ] |
| ; |
| } |
| |
| |
| rule chrono-run-mt ( sources ) |
| { |
| return |
| [ run $(sources) ../build//boost_chrono |
| : : |
| : |
| <library>/boost/system//boost_system |
| : $(sources[1]:B)_shared ] |
| [ run $(sources) ../build//boost_chrono/<link>static |
| : : |
| : |
| <library>/boost/system//boost_system |
| : $(sources[1]:B)_static ] |
| [ run $(sources) |
| : : |
| : <define>BOOST_CHRONO_HEADER_ONLY |
| # comment one of the following lines |
| #<define>BOOST_SYSTEM_INLINED |
| <library>/boost/system//boost_system |
| : $(sources[1]:B)_header ] |
| ; |
| } |
| rule chrono-run2-mt ( sources : name ) |
| { |
| return |
| [ run $(sources) ../build//boost_chrono |
| : : |
| : |
| <library>/boost/system//boost_system |
| : $(name)_shared ] |
| [ run $(sources) ../build//boost_chrono/<link>static |
| : : |
| : |
| <library>/boost/system//boost_system |
| : $(name)_static ] |
| [ run $(sources) |
| : : |
| : <define>BOOST_CHRONO_HEADER_ONLY |
| # comment one of the following lines |
| #<define>BOOST_SYSTEM_INLINED |
| <library>/boost/system//boost_system |
| : $(name)_header ] |
| ; |
| } |
| rule chrono-compile ( sources ) |
| { |
| return |
| [ compile $(sources) |
| : |
| : $(sources[1]:B)_lib ] |
| [ compile $(sources) |
| : <define>BOOST_CHRONO_HEADER_ONLY |
| # comment the following line |
| <define>BOOST_SYSTEM_INLINED |
| : $(sources[1]:B)_header ] |
| ; |
| } |
| |
| rule chrono-compile2 ( sources : name ) |
| { |
| return |
| [ compile $(sources) |
| : |
| : $(name)_lib ] |
| [ compile $(sources) |
| : <define>BOOST_CHRONO_HEADER_ONLY |
| # comment the following line |
| <define>BOOST_SYSTEM_INLINED |
| : $(name)_header ] |
| ; |
| } |
| |
| test-suite "examples" |
| : |
| [ chrono-run ../example/cycle_count.cpp ] |
| [ chrono-run ../example/runtime_resolution.cpp ] |
| [ chrono-run ../example/xtime.cpp ] |
| [ chrono-run ../example/saturating.cpp ] |
| [ chrono-run ../example/min_time_point.cpp ] |
| [ chrono-run ../example/i_dont_like_the_default_duration_behavior.cpp ] |
| [ chrono-run ../example/simulated_thread_interface_demo.cpp ] |
| [ chrono-run ../example/timeval_demo.cpp ] |
| [ chrono-run ../example/chrono_unit_test.cpp ] |
| [ chrono-run ../example/explore_limits.cpp ] |
| [ chrono-run ../example/test_duration.cpp ] |
| [ chrono-run ../example/test_clock.cpp ] |
| [ chrono-run ../example/miscellaneous.cpp ] |
| [ chrono-run ../example/test_special_values.cpp ] |
| [ chrono-run ../example/manipulate_clock_object.cpp ] |
| [ chrono-run ../example/chrono_accuracy_test.cpp ] |
| [ chrono-run-mt ../example/test_thread_clock.cpp ] |
| [ chrono-run ../example/french.cpp ] |
| #[ chrono-run ../example/await_keystroke.cpp ] |
| ; |
| |
| test-suite "traits" |
| : |
| [ chrono-compile2 traits/common_type_duration_pass.cpp : traits_common_type_duration_pass ] |
| [ chrono-compile2 traits/common_type_time_point_pass.cpp : traits_common_type_time_point_pass ] |
| [ chrono-compile2 traits/treat_as_floating_point_pass.cpp : traits_treat_as_floating_point_pass ] |
| [ chrono-run2 traits/duration_values_pass.cpp : traits_duration_values_pass ] |
| ; |
| |
| test-suite "duration" |
| : |
| [ compile-fail duration/duration_duration_fail.cpp ] |
| [ compile-fail duration/ratio_fail.cpp ] |
| [ compile-fail duration/positive_num_fail.cpp ] |
| [ chrono-compile duration/default_ratio_pass.cpp ] |
| [ chrono-compile duration/types_pass.cpp ] |
| [ chrono-compile duration/ratio_alias_pass.cpp ] |
| [ chrono-compile duration/typedefs_pass.cpp ] |
| [ chrono-run duration/arithmetic_pass.cpp ] |
| [ chrono-run duration/duration_cast_pass.cpp ] |
| [ compile-fail duration/duration_cast_int_fail.cpp ] |
| [ chrono-run duration/comparisons_pass.cpp ] |
| [ chrono-run duration/constructor_pass.cpp ] |
| [ compile-fail duration/cons/convert_float_to_int_fail.cpp ] |
| [ compile-fail duration/cons/convert_inexact_fail.cpp ] |
| [ compile-fail duration/cons/implicit_constructot_fail.cpp ] |
| [ compile-fail duration/cons/non_implicit_convertible_rep_fail.cpp ] |
| [ compile-fail duration/cons/treat_as_floating_point_Rep2_true_fail.cpp ] |
| [ compile-fail duration/nonmember/divide_rep2_fail.cpp ] |
| [ compile-fail duration/nonmember/modulus_rep2_fail.cpp ] |
| [ compile-fail duration/nonmember/times_rep2_lhs_fail.cpp ] |
| [ compile-fail duration/nonmember/times_rep2_rhs_fail.cpp ] |
| [ chrono-run duration/duration_values_pass.cpp ] |
| ; |
| |
| test-suite "time_point" |
| : |
| [ chrono-compile2 time_point/default_duration_pass.cpp : time_point_default_duration_pass ] |
| [ compile-fail time_point/not_duration_fail.cpp : : time_point_not_duration_fail ] |
| [ chrono-run2 time_point/arithmetic_pass.cpp : time_point_arithmetic_pass ] |
| [ chrono-run2 time_point/arithmetic_ext_pass.cpp : time_point_arithmetic_ext_pass ] |
| [ chrono-run2 time_point/time_point_cast_pass.cpp : time_point_time_point_cast_pass ] |
| [ compile-fail time_point/time_point_cast_int_fail.cpp : : time_point_time_point_cast_int_fail ] |
| [ chrono-run2 time_point/comparisons_pass.cpp : time_point_comparisons_pass ] |
| [ compile-fail time_point/comparisons/equal_fail.cpp : : time_point_equal_fail ] |
| [ compile-fail time_point/comparisons/less_fail.cpp : : time_point_less_fail ] |
| [ chrono-run2 time_point/constructor_pass.cpp : time_point_constructor_pass ] |
| [ compile-fail time_point/cons/implicit_fail.cpp : : time_point_implicit_fail ] |
| [ compile-fail time_point/cons/non_implicit_convertible_duration_fail.cpp : : time_point_non_implicit_convertible_duration_fail ] |
| [ chrono-run2 time_point/min_max_pass.cpp : time_point_min_max_pass ] |
| ; |
| |
| test-suite "clock" |
| : |
| [ chrono-run2-mt clock/clock_pass.cpp : clock_clock_pass ] |
| ; |
| |
| test-suite "io" |
| : |
| [ chrono-run-mt ../example/io_ex1.cpp ] |
| [ chrono-run ../example/io_ex2.cpp ] |
| [ chrono-run ../example/io_ex3.cpp ] |
| [ chrono-run ../example/io_ex4.cpp ] |
| [ chrono-run ../example/io_ex5.cpp ] |
| ; |
| |
| test-suite "win32" |
| : |
| [ chrono-run win32_test.cpp ] |
| ; |
| |