mirror of
https://github.com/boostorg/build.git
synced 2026-02-17 01:32:12 +00:00
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.
[SVN r78672]
This commit is contained in:
@@ -199,14 +199,14 @@ rule record-time ( target : source : start end user system )
|
||||
# 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) ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -541,8 +541,11 @@ IMPORT $(__name__) : compile compile-fail run run-fail link link-fail
|
||||
: : 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 @@ IMPORT testing : record-time : : testing.record-time ;
|
||||
# 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) ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -286,8 +286,11 @@ toolset.flags("testing.capture-output", "LAUNCHER", [], ["<testing.launcher>"])
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user