Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68005 - in trunk/libs/chrono: build test
From: vicente.botet_at_[hidden]
Date: 2011-01-11 18:21:48


Author: viboes
Date: 2011-01-11 18:21:46 EST (Tue, 11 Jan 2011)
New Revision: 68005
URL: http://svn.boost.org/trac/boost/changeset/68005

Log:
Boost.Chrono: Disable THREAD_CLOCK on single threading

Text files modified:
   trunk/libs/chrono/build/Jamfile.v2 | 20 +----------
   trunk/libs/chrono/test/Jamfile.v2 | 71 +++++++++++++++++++++++++++++++++++++--
   2 files changed, 69 insertions(+), 22 deletions(-)

Modified: trunk/libs/chrono/build/Jamfile.v2
==============================================================================
--- trunk/libs/chrono/build/Jamfile.v2 (original)
+++ trunk/libs/chrono/build/Jamfile.v2 2011-01-11 18:21:46 EST (Tue, 11 Jan 2011)
@@ -7,23 +7,10 @@
 
 # See library home page at http://www.boost.org/libs/chrono
 
-# uncomment one if the above lines if you build outside the Boost release
-#local BOOST_ROOT = /boost_1_41_0 ;
-#local BOOST_ROOT = c:/cygwin/boost_1_41_0 ;
-
-if ! $(BOOST_ROOT)
-{
- BOOST_ROOT = [ modules.peek : BOOST_ROOT ] ;
-}
-
 project boost/chrono
     : source-location ../src
     : requirements
- <os>LINUX:<threading>multi
- # uncomment the line above if you build outside the Boost release
- #<include>$(BOOST_ROOT)
- # uncomment the line above if you build outside the Boost release
- #<include>../../..
+ <threading>single:<define>BOOST_CHRONO_THREAD_DISABLED
         <library>/boost/system//boost_system
         #<define>BOOST_SYSTEM_INLINED
         <define>BOOST_USE_WINDOWS_H
@@ -59,7 +46,7 @@
         <toolset>intel:<cxxflags>-wd304,1418
 
     : usage-requirements # pass these requirement to dependents (i.e. users)
- #<os>LINUX:<threading>multi
+ <threading>single:<define>BOOST_CHRONO_THREAD_DISABLED
         <library>/boost/system//boost_system
         #<define>BOOST_SYSTEM_INLINED
         #<define>BOOST_COMMON_TYPE_USES_STATIC_ASSERT
@@ -84,14 +71,11 @@
 
 SOURCES = chrono thread_clock process_cpu_clocks ;
 
-#process_clock run_timer run_timer_static
  
 lib boost_chrono
     : $(SOURCES).cpp
- #$(BOOST_ROOT)/libs/system/build//boost_system
     :
     <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 ;

Modified: trunk/libs/chrono/test/Jamfile.v2
==============================================================================
--- trunk/libs/chrono/test/Jamfile.v2 (original)
+++ trunk/libs/chrono/test/Jamfile.v2 2011-01-11 18:21:46 EST (Tue, 11 Jan 2011)
@@ -27,7 +27,7 @@
 
 project
     : requirements
- <os>LINUX:<threading>multi
+
         #<library>/boost/system//boost_system
         #<define>BOOST_SYSTEM_INLINED
 
@@ -116,6 +116,69 @@
     ;
 }
 
+
+rule chrono-run-mt ( sources )
+{
+ return
+ [ run $(sources) ../build//boost_chrono
+ : :
+ : <define>BOOST_USE_WINDOWS_H
+ <library>/boost/system//boost_system
+ <threading>multi
+ : $(sources[1]:B)_shared ]
+ [ run $(sources) ../build//boost_chrono/<link>static
+ : :
+ : <define>BOOST_USE_WINDOWS_H <library>/boost/system//boost_system
+ <threading>multi
+ : $(sources[1]:B)_static ]
+# [ run $(sources)
+# : :
+# : <define>BOOST_CHRONO_INLINED
+# # comment one of the following lines
+# #<define>BOOST_SYSTEM_INLINED
+# <library>/boost/system//boost_system
+# : $(sources[1]:B)_header ]
+# [ run $(sources)
+# : :
+# : <define>BOOST_CHRONO_INLINED
+# <define>BOOST_USE_WINDOWS_H
+# # comment one of the following lines
+# #<define>BOOST_SYSTEM_INLINED
+# <library>/boost/system//boost_system
+# : $(sources[1]:B)_header_win ]
+ ;
+}
+rule chrono-run2-mt ( sources : name )
+{
+ return
+ [ run $(sources) ../build//boost_chrono
+ : :
+ : <define>BOOST_USE_WINDOWS_H
+ <library>/boost/system//boost_system
+ <threading>multi
+ : $(name)_shared ]
+ [ run $(sources) ../build//boost_chrono/<link>static
+ : :
+ : <library>/boost/system//boost_system
+ <threading>multi
+ : $(name)_static ]
+# [ run $(sources)
+# : :
+# : <define>BOOST_CHRONO_INLINED
+# # comment one of the following lines
+# #<define>BOOST_SYSTEM_INLINED
+# <library>/boost/system//boost_system
+# : $(name)_header ]
+# [ run $(sources)
+# : :
+# : <define>BOOST_CHRONO_INLINED
+# <define>BOOST_USE_WINDOWS_H
+# # comment one of the following lines
+# #<define>BOOST_SYSTEM_INLINED
+# <library>/boost/system//boost_system
+# : $(name)_header_win ]
+ ;
+}
 rule chrono-compile ( sources )
 {
     return
@@ -174,7 +237,7 @@
         [ chrono-run ../example/test_special_values.cpp ]
         [ chrono-run ../example/manipulate_clock_object.cpp ]
         [ chrono-run ../example/chrono_accuracy_test.cpp ]
- [ chrono-run ../example/test_thread_clock.cpp ]
+ [ chrono-run-mt ../example/test_thread_clock.cpp ]
         [ chrono-run ../example/french.cpp ]
         #[ chrono-run ../example/await_keystroke.cpp ]
         ;
@@ -238,12 +301,12 @@
 
     test-suite "clock"
         :
- [ chrono-run2 clock/clock_pass.cpp : clock_clock_pass_ ]
+ [ chrono-run2-mt clock/clock_pass.cpp : clock_clock_pass ]
         ;
 
     test-suite "io"
         :
- [ chrono-run ../example/io_ex1.cpp ]
+ [ 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 ]


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