Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80629 - in branches/release: . libs libs/date_time libs/date_time/example libs/date_time/test/gregorian libs/date_time/test/local_time libs/date_time/test/posix_time libs/date_time/xmldoc
From: dnljms_at_[hidden]
Date: 2012-09-22 12:21:44


Author: danieljames
Date: 2012-09-22 12:21:43 EDT (Sat, 22 Sep 2012)
New Revision: 80629
URL: http://svn.boost.org/trac/boost/changeset/80629

Log:
Merge some old datetime changes to release

- [70756] Convert jamfile for examples to boost build v2.
- [79211][79212] Suppress g++4.6 warnings in tests.
- Document NO LIB option. Fixes #6077.

Properties modified:
   branches/release/ (props changed)
   branches/release/libs/ (props changed)
   branches/release/libs/date_time/ (props changed)
Text files modified:
   branches/release/libs/date_time/example/Jamfile | 119 ++++++++++-----------------------------
   branches/release/libs/date_time/test/gregorian/testdate.cpp | 10 ++-
   branches/release/libs/date_time/test/local_time/testlocal_time.cpp | 2
   branches/release/libs/date_time/test/posix_time/testtime.cpp | 4 +
   branches/release/libs/date_time/xmldoc/buildinfo.xml | 2
   5 files changed, 44 insertions(+), 93 deletions(-)

Modified: branches/release/libs/date_time/example/Jamfile
==============================================================================
--- branches/release/libs/date_time/example/Jamfile (original)
+++ branches/release/libs/date_time/example/Jamfile 2012-09-22 12:21:43 EDT (Sat, 22 Sep 2012)
@@ -1,105 +1,46 @@
-subproject libs/date_time/example ;
+project libs/date_time/example
+ : requirements
+ <link>static:<define>BOOST_DATE_TIME_STATIC_LINK
+ <library>../build//boost_date_time
+ ;
 
-local DATE_TIME_PROPERTIES = <define>BOOST_DATE_TIME_STATIC_LINK ;
+exe dates_as_strings : gregorian/dates_as_strings.cpp ;
+exe days_alive : gregorian/days_alive.cpp ;
+exe days_till_new_year : gregorian/days_till_new_year.cpp ;
 
+exe days_between_new_years : gregorian/days_between_new_years.cpp ;
+exe find_last_day_of_months : gregorian/find_last_day_of_months.cpp ;
 
-exe dates_as_strings : <lib>../build/boost_date_time
- gregorian/dates_as_strings.cpp
- : <include>$(BOOST_ROOT) $(DATE_TIME_PROPERTIES)
- ;
+exe month_add : gregorian/month_add.cpp ;
 
-exe days_alive : <lib>../build/boost_date_time
- gregorian/days_alive.cpp
- : <include>$(BOOST_ROOT) $(DATE_TIME_PROPERTIES)
- ;
-
-exe days_till_new_year : <lib>../build/boost_date_time
- gregorian/days_till_new_year.cpp
- : <include>$(BOOST_ROOT) $(DATE_TIME_PROPERTIES)
- ;
-
-exe days_between_new_years : <lib>../build/boost_date_time
- gregorian/days_between_new_years.cpp
- : <include>$(BOOST_ROOT) $(DATE_TIME_PROPERTIES)
- ;
-
-exe find_last_day_of_months : <lib>../build/boost_date_time
- gregorian/find_last_day_of_months.cpp
- : <include>$(BOOST_ROOT) $(DATE_TIME_PROPERTIES)
- ;
-
-exe month_add : <lib>../build/boost_date_time
- gregorian/month_add.cpp
- : <include>$(BOOST_ROOT) $(DATE_TIME_PROPERTIES)
- ;
-
-exe localization : gregorian/localization.cpp
- : <include>$(BOOST_ROOT) $(DATE_TIME_PROPERTIES)
- ;
-
-exe print_holidays : <lib>../build/boost_date_time
- gregorian/print_holidays.cpp
- : <include>$(BOOST_ROOT) $(DATE_TIME_PROPERTIES)
- ;
-
-exe print_month : <lib>../build/boost_date_time
- gregorian/print_month.cpp
- : <include>$(BOOST_ROOT) $(DATE_TIME_PROPERTIES)
- ;
-
-exe period_calc : <lib>../build/boost_date_time
- gregorian/period_calc.cpp
- : <include>$(BOOST_ROOT) $(DATE_TIME_PROPERTIES)
- ;
-
-exe days_since_year_start : <lib>../build/boost_date_time
- gregorian/days_since_year_start.cpp
- : <include>$(BOOST_ROOT) $(DATE_TIME_PROPERTIES)
- ;
-
-exe local_utc_conversion : <lib>../build/boost_date_time
- posix_time/local_utc_conversion.cpp
- : <include>$(BOOST_ROOT) $(DATE_TIME_PROPERTIES) <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
- ;
+exe localization : gregorian/localization.cpp ;
+exe print_holidays : gregorian/print_holidays.cpp ;
+exe print_month : gregorian/print_month.cpp ;
+exe period_calc : gregorian/period_calc.cpp ;
 
-exe print_hours : <lib>../build/boost_date_time
- posix_time/print_hours.cpp
- : <include>$(BOOST_ROOT) $(DATE_TIME_PROPERTIES) <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
- ;
-
-exe time_math : <lib>../build/boost_date_time
- posix_time/time_math.cpp
- : <include>$(BOOST_ROOT) $(DATE_TIME_PROPERTIES) <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
- ;
+exe days_since_year_start : gregorian/days_since_year_start.cpp ;
 
-exe time_periods : <lib>../build/boost_date_time
- posix_time/time_periods.cpp
- : <include>$(BOOST_ROOT) $(DATE_TIME_PROPERTIES) <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
+exe local_utc_conversion : posix_time/local_utc_conversion.cpp
+ : <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
                 ;
 
-exe simple_time_zone : <lib>../build/boost_date_time
- local_time/simple_time_zone.cpp
- : <include>$(BOOST_ROOT) $(DATE_TIME_PROPERTIES)
+exe print_hours : posix_time/print_hours.cpp
+ : <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
                 ;
 
-exe calc_rules : <lib>../build/boost_date_time
- local_time/calc_rules.cpp
- : <include>$(BOOST_ROOT) $(DATE_TIME_PROPERTIES)
+exe time_math : posix_time/time_math.cpp
+ : <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
                 ;
 
-exe seconds_since_epoch : <lib>../build/boost_date_time
- local_time/seconds_since_epoch.cpp
- : <include>$(BOOST_ROOT) $(DATE_TIME_PROPERTIES)
- ;
+exe time_periods : posix_time/time_periods.cpp
+ : <define>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
+ ;
 
-exe flight : <lib>../build/boost_date_time
- local_time/flight.cpp
- : <include>$(BOOST_ROOT) $(DATE_TIME_PROPERTIES)
- ;
-
-exe io_tutorial : tutorial/io_tutorial.cpp
- : <include>$(BOOST_ROOT)
- ;
+exe simple_time_zone : local_time/simple_time_zone.cpp ;
+exe calc_rules : local_time/calc_rules.cpp ;
+exe seconds_since_epoch : local_time/seconds_since_epoch.cpp ;
+exe flight : local_time/flight.cpp ;
+exe io_tutorial : tutorial/io_tutorial.cpp ;
 
 # Copyright (c) 2002-2005
 # CrystalClear Software, Inc.

Modified: branches/release/libs/date_time/test/gregorian/testdate.cpp
==============================================================================
--- branches/release/libs/date_time/test/gregorian/testdate.cpp (original)
+++ branches/release/libs/date_time/test/gregorian/testdate.cpp 2012-09-22 12:21:43 EDT (Sat, 22 Sep 2012)
@@ -227,11 +227,14 @@
 
   // most of this testing is in the gregorian_calendar tests
   std::cout << d15.julian_day() << std::endl;
- check_equal("check julian day ", d15.julian_day(), 2232400);
+ check_equal("check julian day ", d15.julian_day(),
+ static_cast<uint32_t>(2232400));
   check_equal("check modjulian day ", d15.modjulian_day(), -167601);
   date d16(2004,2,29);
- check_equal("check julian day ", d16.julian_day(), 2453065);
- check_equal("check modjulian day ", d16.modjulian_day(), 53064);
+ check_equal("check julian day ", d16.julian_day(),
+ static_cast<uint32_t>(2453065));
+ check_equal("check modjulian day ", d16.modjulian_day(),
+ static_cast<uint32_t>(53064));
 
   // most of this testing is in the gregorian_calendar tests
   date d31(2000, Jun, 1);
@@ -281,6 +284,7 @@
     date d(neg_infin);
     tm d_tm = to_tm(d);
     check("Exception not thrown (special_value to_tm)", false);
+ std::cout << d_tm.tm_sec << std::endl; //does nothing useful but stops compiler from complaining about unused d_tm
   }catch(std::out_of_range& e){
     check("Caught expected exception (special_value to_tm)", true);
   }catch(...){

Modified: branches/release/libs/date_time/test/local_time/testlocal_time.cpp
==============================================================================
--- branches/release/libs/date_time/test/local_time/testlocal_time.cpp (original)
+++ branches/release/libs/date_time/test/local_time/testlocal_time.cpp 2012-09-22 12:21:43 EDT (Sat, 22 Sep 2012)
@@ -288,6 +288,8 @@
         local_date_time ldt(not_a_date_time);
         tm ldt_tm = to_tm(ldt);
         check("Exception not thrown (special_value to_tm)", false);
+ //does nothing useful but stops compiler from complaining about unused ldt_tm
+ std::cout << ldt_tm.tm_sec << std::endl;
       }catch(std::out_of_range& e){
         check("Caught expected exception (special_value to_tm)", true);
       }catch(...){

Modified: branches/release/libs/date_time/test/posix_time/testtime.cpp
==============================================================================
--- branches/release/libs/date_time/test/posix_time/testtime.cpp (original)
+++ branches/release/libs/date_time/test/posix_time/testtime.cpp 2012-09-22 12:21:43 EDT (Sat, 22 Sep 2012)
@@ -302,6 +302,8 @@
     ptime pt(pos_infin);
     tm pt_tm = to_tm(pt);
     check("Exception not thrown (special_value to_tm)", false);
+ //following code does nothing useful but stops compiler from complaining about unused pt_tm
+ std::cout << pt_tm.tm_sec << std::endl;
   }catch(std::out_of_range& e){
     check("Caught expected exception (special_value to_tm)", true);
   }catch(...){
@@ -314,6 +316,8 @@
     pt += time_duration(pos_infin);
     tm pt_tm = to_tm(pt);
     check("Exception not thrown (special_value to_tm)", false);
+ //following code does nothing useful but stops compiler from complaining about unused pt_tm
+ std::cout << pt_tm.tm_sec << std::endl;
   }catch(std::out_of_range& e){
     check("Caught expected exception (special_value to_tm)", true);
   }catch(...){

Modified: branches/release/libs/date_time/xmldoc/buildinfo.xml
==============================================================================
--- branches/release/libs/date_time/xmldoc/buildinfo.xml (original)
+++ branches/release/libs/date_time/xmldoc/buildinfo.xml 2012-09-22 12:21:43 EDT (Sat, 22 Sep 2012)
@@ -21,7 +21,7 @@
   <anchor id="overview" />
   <bridgehead renderas="sect3">Overview</bridgehead>
   <para>
- The library has a few functions that require the creation of a library file (mostly to_string, from_string functions). Most library users can make effective use of the library WITHOUT building the library, but simply including the required headers. If the library is needed, the Jamfile in the build directory will produce a "static" library (libboost_date_time) and a "dynamic/shared" library (boost_date_time) that contains these functions.
+ The library has a few functions that require the creation of a library file (mostly to_string, from_string functions). Most library users can make effective use of the library WITHOUT building the library, but simply including the required headers. If the library is needed, the Jamfile in the build directory will produce a "static" library (libboost_date_time) and a "dynamic/shared" library (boost_date_time) that contains these functions. Note that to use the library without the library (particularly on windows) may require using the BOOST_DATE_TIME_NO_LIB flag to the compilation options.
   </para>
   
   <anchor id="compile_options" />


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