summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2006-05-24 14:09:24 (GMT)
committerKen Martin <ken.martin@kitware.com>2006-05-24 14:09:24 (GMT)
commit2cae0ce38974a97965057993538a9a6f4cf92141 (patch)
treec7b7301968b26515b179f4bcdb323c8be0f19206
parent65613537e30efd9edb0e269778d6a5fcab9e9c89 (diff)
downloadCMake-2cae0ce38974a97965057993538a9a6f4cf92141.zip
CMake-2cae0ce38974a97965057993538a9a6f4cf92141.tar.gz
CMake-2cae0ce38974a97965057993538a9a6f4cf92141.tar.bz2
ENH: fix compiler warnings and posibly java test
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx7
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.h5
2 files changed, 6 insertions, 6 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()));
diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h
index 1cce9a8..90e3be1 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.h
+++ b/Source/cmGlobalUnixMakefileGenerator3.h
@@ -125,7 +125,6 @@ public:
// returns true if a progress rule should be added
int ShouldAddProgressRule();
- int GetNumberOfSourceFiles() {return this->NumberOfSourceFiles; }
int GetNumberOfCompilableSourceFilesForTarget(cmTarget &tgt);
int GetTargetTotalNumberOfSourceFiles(cmTarget& target);
@@ -183,8 +182,8 @@ protected:
typedef std::map<cmStdString, cmStdString> MultipleOutputPairsType;
MultipleOutputPairsType MultipleOutputPairs;
- size_t NumberOfSourceFiles;
- size_t NumberOfSourceFilesWritten;
+ int NumberOfSourceFiles;
+ int NumberOfSourceFilesWritten;
std::map<cmStdString, std::vector<cmTarget *> > TargetDependencies;
std::map<cmStdString, int > TargetSourceFileCount;