summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2006-06-16 19:29:25 (GMT)
committerKen Martin <ken.martin@kitware.com>2006-06-16 19:29:25 (GMT)
commite92731ca6e4584c54b9603ebc812d3209e0d294e (patch)
tree82006c62b31ee1262cb21c61babc08eaed13b5bb /Source/cmGlobalUnixMakefileGenerator3.cxx
parent63c241ea1e6e5b37def2ab1644aebd2c6c93ad1d (diff)
downloadCMake-e92731ca6e4584c54b9603ebc812d3209e0d294e.zip
CMake-e92731ca6e4584c54b9603ebc812d3209e0d294e.tar.gz
CMake-e92731ca6e4584c54b9603ebc812d3209e0d294e.tar.bz2
ENH: cleanup how progress is reported for individual targets to fix an integer math issue
Diffstat (limited to 'Source/cmGlobalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx61
1 files changed, 23 insertions, 38 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 9069095..764c346 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -710,48 +710,10 @@ cmGlobalUnixMakefileGenerator3
// Write the rule.
commands.clear();
- std::string progressDir =
- lg->GetMakefile()->GetHomeOutputDirectory();
- progressDir += cmake::GetCMakeFilesDirectory();
-
- {
- // TODO: Convert the total progress count to a make variable.
- cmOStringStream progCmd;
- progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start ";
- // # in target
- progCmd << lg->Convert(progressDir.c_str(),
- cmLocalGenerator::FULL,
- cmLocalGenerator::SHELL);
- int n = this->GetNumberOfSourceFiles();
- if(n > 100)
- {
- n = 100;
- }
- if (this->NumberOfSourceFiles)
- {
- progCmd << " " <<
- (n*this->GetTargetTotalNumberOfSourceFiles(t->second))/
- this->NumberOfSourceFiles;
- }
- else
- {
- progCmd << " 0";
- }
- commands.push_back(progCmd.str());
- }
std::string tmp = cmake::GetCMakeFilesDirectoryPostSlash();
tmp += "Makefile2";
commands.push_back(lg->GetRecursiveMakeCall
(tmp.c_str(),t->second.GetName()));
- {
- cmOStringStream progCmd;
- progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; // # 0
- progCmd << lg->Convert(progressDir.c_str(),
- cmLocalGenerator::FULL,
- cmLocalGenerator::SHELL);
- progCmd << " 0";
- commands.push_back(progCmd.str());
- }
depends.clear();
depends.push_back("cmake_check_build_system");
lg->WriteMakeRule(ruleFileStream,
@@ -888,10 +850,33 @@ cmGlobalUnixMakefileGenerator3
// Write the rule.
commands.clear();
+ progressDir = lg->GetMakefile()->GetHomeOutputDirectory();
+ progressDir += cmake::GetCMakeFilesDirectory();
+
+ {
+ // TODO: Convert the total progress count to a make variable.
+ cmOStringStream progCmd;
+ progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start ";
+ // # in target
+ progCmd << lg->Convert(progressDir.c_str(),
+ cmLocalGenerator::FULL,
+ cmLocalGenerator::SHELL);
+ progCmd << " " << lg->ProgressFiles[t->first].size();
+ commands.push_back(progCmd.str());
+ }
std::string tmp = cmake::GetCMakeFilesDirectoryPostSlash();
tmp += "Makefile2";
commands.push_back(lg->GetRecursiveMakeCall
(tmp.c_str(),localName.c_str()));
+ {
+ cmOStringStream progCmd;
+ progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; // # 0
+ progCmd << lg->Convert(progressDir.c_str(),
+ cmLocalGenerator::FULL,
+ cmLocalGenerator::SHELL);
+ progCmd << " 0";
+ commands.push_back(progCmd.str());
+ }
depends.clear();
depends.push_back("cmake_check_build_system");
localName = lg->GetRelativeTargetDirectory(t->second);