From a6bf59baefe94ce04ba3e67d3e3ae415fc58533a Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Mon, 19 Jun 2006 11:34:50 -0400 Subject: ENH: fix for dependent targets --- Source/cmGlobalUnixMakefileGenerator3.cxx | 12 ++++++++---- Source/cmGlobalUnixMakefileGenerator3.h | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index ebac588..cf7d748 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -867,7 +867,8 @@ cmGlobalUnixMakefileGenerator3 progCmd << lg->Convert(progressDir.c_str(), cmLocalGenerator::FULL, cmLocalGenerator::SHELL); - progCmd << " " << lg->ProgressFiles[t->first].size(); + // + progCmd << " " << this->GetTargetTotalNumberOfProgressFiles(t->second); commands.push_back(progCmd.str()); } std::string tmp = cmake::GetCMakeFilesDirectoryPostSlash(); @@ -938,15 +939,18 @@ cmGlobalUnixMakefileGenerator3 //---------------------------------------------------------------------------- int cmGlobalUnixMakefileGenerator3 -::GetTargetTotalNumberOfSourceFiles(cmTarget& target) +::GetTargetTotalNumberOfProgressFiles(cmTarget& target) { - int result = this->GetNumberOfCompilableSourceFilesForTarget(target); + cmLocalUnixMakefileGenerator3 *lg = + static_cast + (target.GetMakefile()->GetLocalGenerator()); + int result = lg->ProgressFiles[target.GetName()].size(); std::vector& depends = this->GetTargetDepends(target); std::vector::iterator i; for (i = depends.begin(); i != depends.end(); ++i) { - result += this->GetTargetTotalNumberOfSourceFiles(**i); + result += this->GetTargetTotalNumberOfProgressFiles(**i); } return result; diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index ad1e3b9..47557b9 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -126,7 +126,7 @@ public: // returns true if a progress rule should be added int ShouldAddProgressRule(); int GetNumberOfCompilableSourceFilesForTarget(cmTarget &tgt); - int GetTargetTotalNumberOfSourceFiles(cmTarget& target); + int GetTargetTotalNumberOfProgressFiles(cmTarget& target); int GetNumberOfSourceFiles() { return this->NumberOfSourceFiles; }; // what targets does the specified target depend on -- cgit v0.12