Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r78672 - trunk/tools/build/v2/tools
From: jurko.gospodnetic_at_[hidden]
Date: 2012-05-27 02:48:03


Author: jurko
Date: 2012-05-27 02:48:02 EDT (Sun, 27 May 2012)
New Revision: 78672
URL: http://svn.boost.org/trac/boost/changeset/78672

Log:
Fix for Boost Build's time targets failing to be built when run with a msvc exe source. Now the TIME target generator marked as composing so it can correctly handle being given multiple sources as happens in this case where the EXE generator constructs a PDB file as well. This fixes Boost Build ticket #218 and makes the Boost Build timedata unit test pass when run using the msvc toolset.
Text files modified:
   trunk/tools/build/v2/tools/testing-aux.jam | 8 ++++----
   trunk/tools/build/v2/tools/testing.jam | 13 ++++++++-----
   trunk/tools/build/v2/tools/testing.py | 5 ++++-
   3 files changed, 16 insertions(+), 10 deletions(-)

Modified: trunk/tools/build/v2/tools/testing-aux.jam
==============================================================================
--- trunk/tools/build/v2/tools/testing-aux.jam (original)
+++ trunk/tools/build/v2/tools/testing-aux.jam 2012-05-27 02:48:02 EDT (Sun, 27 May 2012)
@@ -199,14 +199,14 @@
 # the 'source' target and display the results both on the standard output and in
 # the 'target' file.
 #
-rule time ( target : source : properties * )
+rule time ( target : sources + : properties * )
 {
     # Set up rule for recording timing information.
- __TIMING_RULE__ on $(source) = testing.record-time $(target) ;
+ __TIMING_RULE__ on $(sources) = testing.record-time $(target) ;
 
- # Make sure that the source is rebuilt any time we need to retrieve that
+ # Make sure the sources get rebuilt any time we need to retrieve that
     # information.
- REBUILDS $(target) : $(source) ;
+ REBUILDS $(target) : $(sources) ;
 }
 
 

Modified: trunk/tools/build/v2/tools/testing.jam
==============================================================================
--- trunk/tools/build/v2/tools/testing.jam (original)
+++ trunk/tools/build/v2/tools/testing.jam 2012-05-27 02:48:02 EDT (Sun, 27 May 2012)
@@ -541,8 +541,11 @@
     : : compile compile-fail run run-fail link link-fail ;
 
 
+# This is a composing generator to support cases where a generator for the
+# specified target constructs other targets as well. One such example is msvc's
+# exe generator that constructs both EXE and PDB targets.
 type.register TIME : time ;
-generators.register-standard testing.time : : TIME ;
+generators.register-composing testing.time : : TIME ;
 
 
 # Note that this rule may be called multiple times for a single target in case
@@ -570,14 +573,14 @@
 # the 'source' target and display the results both on the standard output and in
 # the 'target' file.
 #
-rule time ( target : source : properties * )
+rule time ( target : sources + : properties * )
 {
     # Set up rule for recording timing information.
- __TIMING_RULE__ on $(source) = testing.record-time $(target) ;
+ __TIMING_RULE__ on $(sources) = testing.record-time $(target) ;
 
- # Make sure that the source is rebuilt any time we need to retrieve that
+ # Make sure the sources get rebuilt any time we need to retrieve that
     # information.
- REBUILDS $(target) : $(source) ;
+ REBUILDS $(target) : $(sources) ;
 }
 
 

Modified: trunk/tools/build/v2/tools/testing.py
==============================================================================
--- trunk/tools/build/v2/tools/testing.py (original)
+++ trunk/tools/build/v2/tools/testing.py 2012-05-27 02:48:02 EDT (Sun, 27 May 2012)
@@ -286,8 +286,11 @@
 toolset.flags("testing.unit-test", "LAUNCHER", [], ["<testing.launcher>"])
 toolset.flags("testing.unit-test", "ARGS", [], ["<testing.arg>"])
 
+# This is a composing generator to support cases where a generator for the
+# specified target constructs other targets as well. One such example is msvc's
+# exe generator that constructs both EXE and PDB targets.
 type.register("TIME", ["time"])
-generators.register_standard("testing.time", [], ["TIME"])
+generators.register_composing("testing.time", [], ["TIME"])
 
 
 # The following code sets up actions for this module. It's pretty convoluted,


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