ENH: fix for dependent targets

This commit is contained in:
Ken Martin 2006-06-19 11:34:50 -04:00
parent 6207dc41bd
commit a6bf59baef
2 changed files with 9 additions and 5 deletions

View File

@ -867,7 +867,8 @@ cmGlobalUnixMakefileGenerator3
progCmd << lg->Convert(progressDir.c_str(), progCmd << lg->Convert(progressDir.c_str(),
cmLocalGenerator::FULL, cmLocalGenerator::FULL,
cmLocalGenerator::SHELL); cmLocalGenerator::SHELL);
progCmd << " " << lg->ProgressFiles[t->first].size(); //
progCmd << " " << this->GetTargetTotalNumberOfProgressFiles(t->second);
commands.push_back(progCmd.str()); commands.push_back(progCmd.str());
} }
std::string tmp = cmake::GetCMakeFilesDirectoryPostSlash(); std::string tmp = cmake::GetCMakeFilesDirectoryPostSlash();
@ -938,15 +939,18 @@ cmGlobalUnixMakefileGenerator3
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
int cmGlobalUnixMakefileGenerator3 int cmGlobalUnixMakefileGenerator3
::GetTargetTotalNumberOfSourceFiles(cmTarget& target) ::GetTargetTotalNumberOfProgressFiles(cmTarget& target)
{ {
int result = this->GetNumberOfCompilableSourceFilesForTarget(target); cmLocalUnixMakefileGenerator3 *lg =
static_cast<cmLocalUnixMakefileGenerator3 *>
(target.GetMakefile()->GetLocalGenerator());
int result = lg->ProgressFiles[target.GetName()].size();
std::vector<cmTarget *>& depends = this->GetTargetDepends(target); std::vector<cmTarget *>& depends = this->GetTargetDepends(target);
std::vector<cmTarget *>::iterator i; std::vector<cmTarget *>::iterator i;
for (i = depends.begin(); i != depends.end(); ++i) for (i = depends.begin(); i != depends.end(); ++i)
{ {
result += this->GetTargetTotalNumberOfSourceFiles(**i); result += this->GetTargetTotalNumberOfProgressFiles(**i);
} }
return result; return result;

View File

@ -126,7 +126,7 @@ public:
// returns true if a progress rule should be added // returns true if a progress rule should be added
int ShouldAddProgressRule(); int ShouldAddProgressRule();
int GetNumberOfCompilableSourceFilesForTarget(cmTarget &tgt); int GetNumberOfCompilableSourceFilesForTarget(cmTarget &tgt);
int GetTargetTotalNumberOfSourceFiles(cmTarget& target); int GetTargetTotalNumberOfProgressFiles(cmTarget& target);
int GetNumberOfSourceFiles() { return this->NumberOfSourceFiles; }; int GetNumberOfSourceFiles() { return this->NumberOfSourceFiles; };
// what targets does the specified target depend on // what targets does the specified target depend on