diff options
author | Ken Martin <ken.martin@kitware.com> | 2006-06-12 15:40:31 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2006-06-12 15:40:31 (GMT) |
commit | 14cc1efe2ce7690fcf689558bc1862f8f908c2cb (patch) | |
tree | 74521854b723f56f5e821d565e4a52f61c869de0 | |
parent | a21a320a2654336f196349c46eb3f0825da59fd3 (diff) | |
download | CMake-14cc1efe2ce7690fcf689558bc1862f8f908c2cb.zip CMake-14cc1efe2ce7690fcf689558bc1862f8f908c2cb.tar.gz CMake-14cc1efe2ce7690fcf689558bc1862f8f908c2cb.tar.bz2 |
ENH: some cleanup to progress
-rw-r--r-- | Source/cmGlobalUnixMakefileGenerator3.cxx | 10 | ||||
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 17 | ||||
-rw-r--r-- | Source/cmake.cxx | 4 |
3 files changed, 16 insertions, 15 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index b3b7e6b..da3f6a3 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -860,11 +860,11 @@ cmGlobalUnixMakefileGenerator3 { progCmd << " " << *i; } - if (progFiles.size()) - { - commands.push_back(progCmd.str()); - } - + commands.push_back(progCmd.str()); + progressDir = "Building target "; + progressDir += t->first; + lg->AppendEcho(commands,progressDir.c_str()); + this->AppendGlobalTargetDepends(depends,t->second); lg->WriteMakeRule(ruleFileStream, "All Build rule for target.", localName.c_str(), depends, commands, true); diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index c5bf92d..7ab801b 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -408,20 +408,21 @@ cmMakefileTargetGenerator cmGlobalUnixMakefileGenerator3* gg = static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator); int prog = gg->ShouldAddProgressRule(); + + std::string progressDir = this->Makefile->GetHomeOutputDirectory(); + progressDir += "/CMakeFiles"; + cmOStringStream progCmd; + progCmd << "$(CMAKE_COMMAND) -E cmake_progress_report "; + progCmd << this->LocalGenerator->Convert(progressDir.c_str(), + cmLocalGenerator::FULL, + cmLocalGenerator::SHELL); if (prog) { - std::string progressDir = this->Makefile->GetHomeOutputDirectory(); - progressDir += "/CMakeFiles"; - cmOStringStream progCmd; - progCmd << "$(CMAKE_COMMAND) -E cmake_progress_report "; - progCmd << this->LocalGenerator->Convert(progressDir.c_str(), - cmLocalGenerator::FULL, - cmLocalGenerator::SHELL); progCmd << " " << prog; - commands.push_back(progCmd.str()); this->LocalGenerator->ProgressFiles[this->Target->GetName()]. push_back(prog); } + commands.push_back(progCmd.str()); // Construct the compile rules. std::string compileRuleVar = "CMAKE_"; diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 6bbf9d1..9a99f8e 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1004,7 +1004,7 @@ int cmake::ExecuteCMakeCommand(std::vector<std::string>& args) } // Command to report progress for a build - else if (args[1] == "cmake_progress_report" && args.size() >= 4) + else if (args[1] == "cmake_progress_report" && args.size() >= 3) { std::string dirName = args[2]; dirName += "/Progress"; @@ -1037,7 +1037,7 @@ int cmake::ExecuteCMakeCommand(std::vector<std::string>& args) if (count > 0) { // print the progress - fprintf(stdout,"%3i%% complete\n",((fileNum-3)*100)/count); + fprintf(stdout,"[%3i%%] ",((fileNum-3)*100)/count); } fclose(progFile); } |