ENH: added progress to custom commands with comments

This commit is contained in:
Ken Martin 2006-07-13 14:03:56 -04:00
parent 0d6b407630
commit ad3ca4c009
1 changed files with 13 additions and 0 deletions

View File

@ -708,6 +708,19 @@ void cmMakefileTargetGenerator
std::string comment = this->LocalGenerator->ConstructComment(cc);
if(!comment.empty())
{
// add in a progress call if needed
std::string progressDir = this->Makefile->GetHomeOutputDirectory();
progressDir += cmake::GetCMakeFilesDirectory();
cmOStringStream progCmd;
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_report ";
progCmd << this->LocalGenerator->Convert(progressDir.c_str(),
cmLocalGenerator::FULL,
cmLocalGenerator::SHELL);
this->NumberOfProgressActions++;
progCmd << " $(CMAKE_PROGRESS_"
<< this->NumberOfProgressActions
<< ")";
commands.push_back(progCmd.str());
this->LocalGenerator
->AppendEcho(commands, comment.c_str(),
cmLocalUnixMakefileGenerator3::EchoGenerate);