Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58324 - in sandbox/chrono/libs/chrono: build doc test
From: vicente.botet_at_[hidden]
Date: 2009-12-12 05:37:48


Author: viboes
Date: 2009-12-12 05:37:47 EST (Sat, 12 Dec 2009)
New Revision: 58324
URL: http://svn.boost.org/trac/boost/changeset/58324

Log:
Boost.Chrono: Version 0.2.6
* disable VC++ foolishness
* Update Jamfiles to manage with dll
* removal of conversion warning in test_duration
* manage with MSVC reporting a warning instead of an error when there is an integral constant overflow

Text files modified:
   sandbox/chrono/libs/chrono/build/Jamfile.v2 | 30 ++++++++++-------
   sandbox/chrono/libs/chrono/doc/chrono.qbk | 59 ++++++++++++++++++++++++++++------
   sandbox/chrono/libs/chrono/test/Jamfile.v2 | 68 ++++++++++++++++++++++++---------------
   sandbox/chrono/libs/chrono/test/chrono_unit_test.cpp | 2 +
   sandbox/chrono/libs/chrono/test/test_duration.cpp | 2
   5 files changed, 110 insertions(+), 51 deletions(-)

Modified: sandbox/chrono/libs/chrono/build/Jamfile.v2
==============================================================================
--- sandbox/chrono/libs/chrono/build/Jamfile.v2 (original)
+++ sandbox/chrono/libs/chrono/build/Jamfile.v2 2009-12-12 05:37:47 EST (Sat, 12 Dec 2009)
@@ -13,23 +13,29 @@
 }
 
 project boost/chrono
- : requirements
- <include>/boost_1_39_0
- <include>../../..
- <include>../src
- #<library>/boost_1_39_0/libs/system/build//boost_system
     : source-location ../src
+ : requirements
+ #<include>/boost_1_39_0
+ #<include>../../..
+ #<include>../src
+ #<link>shared:<library>/boost/system//boost_system
+ #<link>shared:<define>BOOST_ALL_DYN_LINK=1
+ #<link>static:<define>BOOST_All_STATIC_LINK=1
+ #<toolset>gcc:<linkflags>--enable-auto-import
     : usage-requirements # pass these requirement to dependents (i.e. users)
- <link>shared:<define>BOOST_CHRONO_DYN_LINK=1
- <link>static:<define>BOOST_CHRONO_STATIC_LINK=1
+ <link>shared:<define>BOOST_CHRONO_DYN_LINK=1
+ #<link>static:<define>BOOST_CHRONO_STATIC_LINK=1
     ;
 
 SOURCES = chrono process_clock run_timer run_timer_static ;
 
-static-lib boost_chrono
- : $(SOURCES).cpp
- : <link>shared:<define>BOOST_ALL_DYN_LINK=1
- <link>static:<define>BOOST_All_STATIC_LINK=1
- ;
+lib boost_chrono
+ : $(SOURCES).cpp
+ ../../system/build//boost_system
+ #../../exception/build//boost_exception
+ :
+ <link>shared:<define>BOOST_ALL_DYN_LINK=1 # tell source we're building dll's
+ <link>static:<define>BOOST_All_STATIC_LINK=1 # tell source we're building static lib's
+ ;
 
 #boost-install boost_chrono ;
\ No newline at end of file

Modified: sandbox/chrono/libs/chrono/doc/chrono.qbk
==============================================================================
--- sandbox/chrono/libs/chrono/doc/chrono.qbk (original)
+++ sandbox/chrono/libs/chrono/doc/chrono.qbk 2009-12-12 05:37:47 EST (Sat, 12 Dec 2009)
@@ -23,6 +23,8 @@
     ]
 ]
 
+[def __Boost_Chrono__ [*Boost.Chrono]]
+
 [/
 [section Preface]
 
@@ -429,7 +431,7 @@
 [/======================================]
 
 [/=================================]
-[heading Getting __Boost_Chrono__]
+[heading Getting __Boost_Chrono__ ]
 [/=================================]
 
 You can get the last stable release of __Boost_Chrono__ by downloading [^chrono.zip] from the
@@ -438,13 +440,18 @@
 You can also access the latest (unstable?) state from the [@https://svn.boost.org/svn/boost/sandbox/chrono Boost Sandbox].
 
 [/=================================]
-[heading Building __Boost_Chrono__]
+[heading Building __Boost_Chrono__ ]
 [/=================================]
 
 __Boost_Chrono__ is not a header only library. You need to compile it before use.
 
+The simple way is to decompress the compressed file in the Boost release directory you want to test.
+
     bjam libs/chrono/build
 
+If you decompress in another directory, you will need to comment some lines, and uncomment and change others. Sorry for this, but I have not rached yet to write a Jamfile that is able to work in both environements and use the BOOST_ROOT variable. Any help is welcome.
+
+
 
 [/=========================]
 [heading Requirements]
@@ -493,25 +500,32 @@
 
 The implementation will eventually work with most C++03 conforming compilers. Initial tests have been run on
 
-Windows with
+On Windows with
 
 * VC++ 9.0 SP1
-* Intel 11.0
+[/* Intel 11.0]
 
-On Ubuntu Linux with
+[/On Ubuntu Linux with
 
 * GCC 4.2.4
+]
 
-On SL Linux with
+[/On SL Linux with
 
 * GCC 3.4.6
 * GCC 4.1.2
+]
 
 On Cygwin with
 
 * GCC 3.4.4
-[/* GCC 4.3.2]
+* GCC 4.3.2
+
+On MinGW with
 
+* GCC 4.4.0
+
+[note Please let me know how this works on other platforms.]
 
 [note Please send any questions, comments and bug reports to boost <at> lists <dot> boost <dot> org.]
 
@@ -2016,6 +2030,29 @@
 [section:history Appendix A: History]
 [/==================================]
 
+[section [*Version 0.2.1, December 12, 2009] ['Bug fixes]]
+
+[*Bug Fixes]
+
+* Replace INTMAX_C by BOOST_INTMAX_C until boost/cstdint;hpp ensures INTMAX_C is always defined.
+* Define BOOST_CHRONO_HAS_CLOCK_MONOTONIC when BOOST_CHRONO_WINDOWS_API
+* Commenting invalid operator declarations
+* Take care of Boost min/max recommendations
+* complete qualification boost::chrono::duration to avoid possible BUG in gcc-4.4.0 reporting the following error
+
+ ./boost/chrono/chrono.hpp:945: error: declaration of 'typedef class boost::chrono::duration<long long int, boost::ratio<1ll, 10000000ll> > boost::chrono::system_clock::duration'
+ ./boost/chrono/chrono.hpp:458: error: changes meaning of 'duration' from 'class boost::chrono::duration<long long int, boost::ratio<1ll, 10000000ll> >'
+
+* cleanup of simulated...
+* warning removal on posix/process_clock.cpp
+* disable VC++ foolishness
+* Update Jamfiles to manage with dll
+* removal of conversion warning in test_duration
+* manage with MSVC reporting a warning instead of an error when there is an integral constant overflow
+
+
+[endsect]
+
 [section [*Version 0.2.0, December 8, 2009] ['+ Features + Bug fixes + Updated documentation]]
 
 [*Features:]
@@ -2023,7 +2060,7 @@
 * Added ratio construction and assignment from an equivalent ratio ([@http://home.roadrunner.com/~hinnant/issue_review/lwg-active.html#1281 [*LWG 1281. CopyConstruction and Assignment between ratios having the same normalized form]])
 * Added nested ratio typedef type ([@http://home.roadrunner.com/~hinnant/issue_review/lwg-active.html#1281 [*LWG 1281. CopyConstruction and Assignment between ratios having the same normalized form]])
 * Added BOOST_CHRONO_HAS_CLOCK_MONOTONIC macro to state if monotonic_clock is provided on this platform.
-* Added duration operator% ([@http://home.roadrunner.com/~hinnant/issue_review/lwg-defects.html#934 [*934. duration is missing operator%]])
+* Added duration operator% ([@http://home.roadrunner.com/~hinnant/issue_review/lwg-defects.html#934 [*LGW 934. duration is missing operator%]])
 * Added BOOST_CONSTEXPR when constexpr should be used
 * Complete duration operator* and operator/
 
@@ -2041,7 +2078,7 @@
 
 * The documentation is written now using quick-book using as base [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2661.htm [*N2661 - A Foundation to Sleep On]] .
 
-[*Bugs]
+[*Bug Fixes]
 
 * operator/ was ambiguous: Disambiguate duration operator/
 * CLOCK_MONOTONIC is not defined with cygwin/gcc 3.4: Disable code when BOOST_CHRONO_HAS_CLOCK_MONOTONIC is not defined.
@@ -2169,7 +2206,7 @@
 [endsect]
 [section Appendix E: Tests]
 
-In order to test you need to do just
+In order to test you need to do.
 
     bjam libs/chrono/test
 
@@ -2177,7 +2214,7 @@
 [section `ratio`]
 [table
     [[Name] [kind] [Description] [Result] [Ticket]]
- [[ratio_fail_1.] [compile-fails] [...] [Pass] [#]]
+ [[ratio_fail_1] [compile-fails] [...] [Pass] [#]]
     [[ratio_test] [run] [...] [Pass] [#]]
 ]
 [endsect]

Modified: sandbox/chrono/libs/chrono/test/Jamfile.v2
==============================================================================
--- sandbox/chrono/libs/chrono/test/Jamfile.v2 (original)
+++ sandbox/chrono/libs/chrono/test/Jamfile.v2 2009-12-12 05:37:47 EST (Sat, 12 Dec 2009)
@@ -10,10 +10,10 @@
 project
     : requirements
       #<library>/boost/chrono//boost_chrono
- <library>/boost/system//boost_system/<link>static
- #<library>../build//boost_chrono/<link>static
- <include>/boost_1_39_0
- <include>../../..
+ #<library>/boost/system//boost_system
+ <library>../build//boost_chrono
+ #<include>/boost_1_39_0
+ #<include>../../..
       <toolset>msvc:<asynch-exceptions>on
     ;
 
@@ -24,36 +24,50 @@
 
     test-suite "ratio"
         :
- [ run ratio_test.cpp ]
- [ compile-fail ratio_fail_test1.cpp ]
+ [ compile-fail ratio_fail_test1.cpp : <toolset>msvc:<warnings-as-errors>on ]
+ [ run ratio_test.cpp : : : <link>static ]
+ [ run ratio_test.cpp ../../system/build : : : : ratio_test_dll ]
         ;
 
 
     test-suite "chrono"
         :
- [ run chrono_unit_test.cpp ../build//boost_chrono/<link>static ]
- [ run explore_limits.cpp ../build//boost_chrono/<link>static ]
- [ run test_duration.cpp ../build//boost_chrono/<link>static ]
- [ run test_system_clock.cpp ../build//boost_chrono/<link>static ]
- [ run miscellaneous.cpp ../build//boost_chrono/<link>static ]
- [ run test_special_values.cpp ../build//boost_chrono/<link>static ]
- [ run manipulate_clock_object.cpp ../build//boost_chrono/<link>static ]
- [ run ../example/cycle_count.cpp ../build//boost_chrono/<link>static ]
- [ run ../example/runtime_resolution.cpp ../build//boost_chrono/<link>static ]
- [ run ../example/xtime.cpp ../build//boost_chrono/<link>static ]
- [ run ../example/saturating.cpp ../build//boost_chrono/<link>static ]
- [ run ../example/min_time_point.cpp ../build//boost_chrono/<link>static ]
- [ run ../example/i_dont_like_the_default_duration_behavior.cpp ../build//boost_chrono/<link>static ]
- [ run ../example/simulated_thread_interface_demo.cpp ../build//boost_chrono/<link>static ]
- [ run ../example/timeval_demo.cpp ../build//boost_chrono/<link>static ]
+ [ run chrono_unit_test.cpp : : : <link>static ]
+ [ run chrono_unit_test.cpp ../../system/build : : : : chrono_unit_test_dll ]
+ [ run explore_limits.cpp : : : <link>static ]
+ [ run explore_limits.cpp ../../system/build : : : : explore_limits_dll ]
+ [ run test_duration.cpp : : : <link>static ]
+ [ run test_duration.cpp ../../system/build : : : : test_duration_dll ]
+ [ run test_system_clock.cpp : : : <link>static ]
+ [ run test_system_clock.cpp ../../system/build : : : : test_system_clock_dll ]
+ [ run miscellaneous.cpp : : : <link>static ]
+ [ run miscellaneous.cpp ../../system/build : : : : miscellaneous_dll ]
+ [ run test_special_values.cpp : : : <link>static ]
+ [ run test_special_values.cpp ../../system/build : : : : test_special_values_dll ]
+ [ run manipulate_clock_object.cpp : : : <link>static ]
+ [ run manipulate_clock_object.cpp ../../system/build : : : : manipulate_clock_object_dll ]
+ [ run ../example/cycle_count.cpp : : : <link>static ]
+ [ run ../example/cycle_count.cpp ../../system/build : : : : cycle_count_dll ]
+ [ run ../example/runtime_resolution.cpp : : : <link>static ]
+ [ run ../example/runtime_resolution.cpp ../../system/build : : : : runtime_resolution_dll ]
+ [ run ../example/xtime.cpp : : : <link>static ]
+ [ run ../example/xtime.cpp ../../system/build : : : : xtime_dll ]
+ [ run ../example/saturating.cpp : : : <link>static ]
+ [ run ../example/saturating.cpp ../../system/build : : : : saturating_dll ]
+ [ run ../example/min_time_point.cpp : : : <link>static ]
+ [ run ../example/min_time_point.cpp ../../system/build : : : : min_time_point_dll ]
+ [ run ../example/i_dont_like_the_default_duration_behavior.cpp : : : <link>static ]
+ [ run ../example/i_dont_like_the_default_duration_behavior.cpp ../../system/build : : : : i_dont_like_the_default_duration_behavior_dll ]
+ [ run ../example/simulated_thread_interface_demo.cpp : : : <link>static ]
+ [ run ../example/simulated_thread_interface_demo.cpp ../../system/build : : : : simulated_thread_interface_demo_dll ]
+ [ run ../example/timeval_demo.cpp : : : <link>static ]
+ [ run ../example/timeval_demo.cpp ../../system/build : : : : timeval_demo_dll ]
         ;
 
     test-suite "timer"
         :
- [ run ../example/run_timer_example.cpp ../build//boost_chrono/<link>static ]
- [ run run_timer_test.cpp ../build//boost_chrono/<link>static
- : : : ]
- #[ run run_timer_test.cpp ../build//boost_chrono/<link>static
- # : : : : run_timer_test_dll
- #]
+ [ run ../example/run_timer_example.cpp : : : <link>static ]
+ [ run ../example/run_timer_example.cpp ../../system/build : : : : run_timer_example_dll ]
+ [ run run_timer_test.cpp : : : <link>static ]
+ [ run run_timer_test.cpp ../../system/build : : : : run_timer_test_dll ]
         ;

Modified: sandbox/chrono/libs/chrono/test/chrono_unit_test.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/chrono_unit_test.cpp (original)
+++ sandbox/chrono/libs/chrono/test/chrono_unit_test.cpp 2009-12-12 05:37:47 EST (Sat, 12 Dec 2009)
@@ -5,6 +5,8 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
+#define _CRT_SECURE_NO_WARNINGS // disable VC++ foolishness
+
 #include <boost/chrono/chrono.hpp>
 #include <iostream>
 

Modified: sandbox/chrono/libs/chrono/test/test_duration.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/test_duration.cpp (original)
+++ sandbox/chrono/libs/chrono/test/test_duration.cpp 2009-12-12 05:37:47 EST (Sat, 12 Dec 2009)
@@ -179,7 +179,7 @@
     //tmpl2(3,3); // Will not compile, 3 is not implicitly convertible to any `duration`
 
     {
- double r = milliseconds(3) / milliseconds(3);
+ double r = double(milliseconds(3) / milliseconds(3));
     duration<double, boost::milli> d = milliseconds(3) * 2.5;
     duration<double, boost::milli> d2 = 2.5 * milliseconds(3) ;
     duration<double, boost::milli> d3 = milliseconds(3) / 2.5;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk