diff options
author | Ken Martin <ken.martin@kitware.com> | 2006-08-29 16:55:11 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2006-08-29 16:55:11 (GMT) |
commit | bdb530191dba75f8b358367d6da9dd8aa8e763e3 (patch) | |
tree | fcef33f6c77ed4d3f497bc86cb652df9d3a7f661 /Source/cmGlobalUnixMakefileGenerator3.cxx | |
parent | 21d7a242fd3bd1a36db6dd7f7e07135ef8271ea4 (diff) | |
download | CMake-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.cxx | 30 |
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; |