diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index b3b7e6baa..da3f6a396 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 c5bf92d7e..7ab801b50 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -408,20 +408,21 @@ cmMakefileTargetGenerator cmGlobalUnixMakefileGenerator3* gg = static_cast(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 6bbf9d116..9a99f8e08 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1004,7 +1004,7 @@ int cmake::ExecuteCMakeCommand(std::vector& 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& 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); }