summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2006-08-29 16:55:11 (GMT)
committerKen Martin <ken.martin@kitware.com>2006-08-29 16:55:11 (GMT)
commitbdb530191dba75f8b358367d6da9dd8aa8e763e3 (patch)
treefcef33f6c77ed4d3f497bc86cb652df9d3a7f661 /Source/cmGlobalUnixMakefileGenerator3.cxx
parent21d7a242fd3bd1a36db6dd7f7e07135ef8271ea4 (diff)
downloadCMake-bdb530191dba75f8b358367d6da9dd8aa8e763e3.zip
CMake-bdb530191dba75f8b358367d6da9dd8aa8e763e3.tar.gz
CMake-bdb530191dba75f8b358367d6da9dd8aa8e763e3.tar.bz2
BUG: bad progress for named top level targets
Diffstat (limited to 'Source/cmGlobalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx30
1 files changed, 20 insertions, 10 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index a647a9c..d955183 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -823,8 +823,10 @@ cmGlobalUnixMakefileGenerator3
cmLocalGenerator::FULL,
cmLocalGenerator::SHELL);
//
+ std::set<cmStdString> emitted;
progCmd << " "
- << this->GetTargetTotalNumberOfActions(t->second);
+ << this->GetTargetTotalNumberOfActions(t->second,
+ emitted);
commands.push_back(progCmd.str());
}
std::string tmp = cmake::GetCMakeFilesDirectoryPostSlash();
@@ -895,18 +897,26 @@ cmGlobalUnixMakefileGenerator3
//----------------------------------------------------------------------------
int cmGlobalUnixMakefileGenerator3
-::GetTargetTotalNumberOfActions(cmTarget& target)
+::GetTargetTotalNumberOfActions(cmTarget& target,
+ std::set<cmStdString> &emitted)
{
- cmLocalUnixMakefileGenerator3 *lg =
- static_cast<cmLocalUnixMakefileGenerator3 *>
- (target.GetMakefile()->GetLocalGenerator());
- int result = static_cast<int>(lg->ProgressFiles[target.GetName()].size());
- std::vector<cmTarget *>& depends = this->GetTargetDepends(target);
+ // do not double count
+ int result = 0;
- std::vector<cmTarget *>::iterator i;
- for (i = depends.begin(); i != depends.end(); ++i)
+ if(emitted.insert(target.GetName()).second)
{
- result += this->GetTargetTotalNumberOfActions(**i);
+ cmLocalUnixMakefileGenerator3 *lg =
+ static_cast<cmLocalUnixMakefileGenerator3 *>
+ (target.GetMakefile()->GetLocalGenerator());
+ result = static_cast<int>(lg->ProgressFiles[target.GetName()].size());
+
+ std::vector<cmTarget *>& depends = this->GetTargetDepends(target);
+
+ std::vector<cmTarget *>::iterator i;
+ for (i = depends.begin(); i != depends.end(); ++i)
+ {
+ result += this->GetTargetTotalNumberOfActions(**i, emitted);
+ }
}
return result;