ENH: Add simple progress reporting during make
This commit is contained in:
parent
000bce884d
commit
fd8e45d4a1
|
@ -623,6 +623,8 @@ cmGlobalUnixMakefileGenerator3
|
|||
commands.clear();
|
||||
commands.push_back(lg->GetRecursiveMakeCall
|
||||
("CMakeFiles/Makefile2",t->second.GetName()));
|
||||
std::string echoCommand = "@echo \"\"";
|
||||
commands.push_back(echoCommand.c_str());
|
||||
depends.clear();
|
||||
depends.push_back("cmake_check_build_system");
|
||||
lg->WriteMakeRule(ruleFileStream,
|
||||
|
@ -675,6 +677,7 @@ cmGlobalUnixMakefileGenerator3
|
|||
std::string localName;
|
||||
std::string makeTargetName;
|
||||
|
||||
|
||||
// write the directory level rules for this local gen
|
||||
this->WriteDirectoryRules2(ruleFileStream,lg);
|
||||
|
||||
|
@ -707,6 +710,8 @@ cmGlobalUnixMakefileGenerator3
|
|||
<< localName << "\n\n";
|
||||
|
||||
commands.clear();
|
||||
std::string echoCommand = "@$(CMAKE_COMMAND) -E echo_append \".\"";
|
||||
commands.push_back(echoCommand.c_str());
|
||||
if (t->second.GetType() != cmTarget::UTILITY)
|
||||
{
|
||||
makeTargetName = localName;
|
||||
|
@ -731,6 +736,7 @@ cmGlobalUnixMakefileGenerator3
|
|||
// Write the rule.
|
||||
localName += "/all";
|
||||
depends.clear();
|
||||
|
||||
this->AppendGlobalTargetDepends(depends,t->second);
|
||||
lg->WriteMakeRule(ruleFileStream, "All Build rule for target.",
|
||||
localName.c_str(), depends, commands, true);
|
||||
|
|
|
@ -886,6 +886,8 @@ cmLocalUnixMakefileGenerator3::AppendEcho(std::vector<std::string>& commands,
|
|||
break;
|
||||
}
|
||||
}
|
||||
#else
|
||||
(void)color;
|
||||
#endif
|
||||
|
||||
// Echo one line at a time.
|
||||
|
@ -1411,6 +1413,8 @@ void cmLocalUnixMakefileGenerator3
|
|||
this->CreateCDCommand(commands,
|
||||
this->Makefile->GetHomeOutputDirectory(),
|
||||
this->Makefile->GetStartOutputDirectory());
|
||||
std::string echoCommand = "@echo \"\"";
|
||||
commands.push_back(echoCommand.c_str());
|
||||
this->WriteMakeRule(ruleFileStream, "The main all target", "all",
|
||||
depends, commands, true);
|
||||
|
||||
|
|
|
@ -749,6 +749,8 @@ void CMakeCommandUsage(const char* program)
|
|||
"content to directory 'destination'\n"
|
||||
<< " compare_files file1 file2 - check if file1 is same as file2\n"
|
||||
<< " echo [string]... - displays arguments as text\n"
|
||||
<< " echo_append [string]... - displays arguments as text but no new"
|
||||
" line\n"
|
||||
<< " environment - display the current enviroment\n"
|
||||
<< " remove file1 file2 ... - remove the file(s)\n"
|
||||
<< " tar [cxt][vfz] file.tar file/dir1 file/dir2 ... - create a tar.\n"
|
||||
|
@ -835,6 +837,19 @@ int cmake::ExecuteCMakeCommand(std::vector<std::string>& args)
|
|||
return 0;
|
||||
}
|
||||
|
||||
// Echo string no new line
|
||||
else if (args[1] == "echo_append" )
|
||||
{
|
||||
unsigned int cc;
|
||||
const char* space = "";
|
||||
for ( cc = 2; cc < args.size(); cc ++ )
|
||||
{
|
||||
std::cout << space << args[cc];
|
||||
space = " ";
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
||||
// Command to create a symbolic link. Fails on platforms not
|
||||
// supporting them.
|
||||
|
|
Loading…
Reference in New Issue