diff options
Diffstat (limited to 'Source/cmGlobalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmGlobalUnixMakefileGenerator3.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 805545a..13bf515 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -173,8 +173,9 @@ GetNumberOfCompilableSourceFilesForTarget(cmTarget &tgt) //---------------------------------------------------------------------------- void cmGlobalUnixMakefileGenerator3::Generate() { - // initialize progress - this->NumberOfSourceFiles = 0; + // initialize progress, always pretend there is at least 1 file + // to avoid division errors etc + this->NumberOfSourceFiles = 1; unsigned int i; for (i = 0; i < this->LocalGenerators.size(); ++i) { @@ -709,7 +710,7 @@ cmGlobalUnixMakefileGenerator3 cmLocalGenerator::SHELL); progCmd << " " << (100*this->GetTargetTotalNumberOfSourceFiles(t->second))/ - this->GetNumberOfSourceFiles(); + this->NumberOfSourceFiles; commands.push_back(progCmd.str()); commands.push_back(lg->GetRecursiveMakeCall ("CMakeFiles/Makefile2",t->second.GetName())); |