diff options
Diffstat (limited to '')
-rw-r--r-- | src/targetfile.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/targetfile.cpp b/src/targetfile.cpp index 4cf5361..73cd3ff 100644 --- a/src/targetfile.cpp +++ b/src/targetfile.cpp | |||
@@ -6,6 +6,8 @@ | |||
6 | #include "function.h" | 6 | #include "function.h" |
7 | #include "viewer.h" | 7 | #include "viewer.h" |
8 | 8 | ||
9 | #include <set> | ||
10 | |||
9 | PluginInterface2(file, TargetFile, Target, "Mike Buland", 0, 1 ); | 11 | PluginInterface2(file, TargetFile, Target, "Mike Buland", 0, 1 ); |
10 | 12 | ||
11 | TargetFile::TargetFile() | 13 | TargetFile::TargetFile() |
@@ -23,6 +25,24 @@ void TargetFile::check( Build &bld ) | |||
23 | pRule->setTarget( getName() ); | 25 | pRule->setTarget( getName() ); |
24 | StringList lFinal = pRule->execute( bld, getInput(), lPerf ); | 26 | StringList lFinal = pRule->execute( bld, getInput(), lPerf ); |
25 | 27 | ||
28 | { | ||
29 | std::set<std::string> sUsed; | ||
30 | for( PerformList::iterator i = lPerf.begin(); i != lPerf.end(); i++ ) | ||
31 | { | ||
32 | isuck: if( i == lPerf.end() ) break; | ||
33 | if( sUsed.find( (*i)->getTarget() ) != sUsed.end() ) | ||
34 | { | ||
35 | PerformList::iterator j = i; | ||
36 | j++; | ||
37 | delete *i; | ||
38 | lPerf.erase( i ); | ||
39 | i = j; | ||
40 | goto isuck; | ||
41 | } | ||
42 | sUsed.insert( (*i)->getTarget() ); | ||
43 | } | ||
44 | } | ||
45 | |||
26 | bld.getView()->beginPerforms( lPerf.size() ); | 46 | bld.getView()->beginPerforms( lPerf.size() ); |
27 | 47 | ||
28 | for( PerformList::iterator i = lPerf.begin(); i != lPerf.end(); i++ ) | 48 | for( PerformList::iterator i = lPerf.begin(); i != lPerf.end(); i++ ) |