summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2006-05-15 17:02:28 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2006-05-15 17:02:28 (GMT)
commitfd8e45d4a1c4f6b6dbd5edb99d77244f6cf836ff (patch)
tree930ed09668896b9989e4f341deaca24bc5de1685
parent000bce884dacc774ef50a76714bc1e7d2687a90a (diff)
downloadCMake-fd8e45d4a1c4f6b6dbd5edb99d77244f6cf836ff.zip
CMake-fd8e45d4a1c4f6b6dbd5edb99d77244f6cf836ff.tar.gz
CMake-fd8e45d4a1c4f6b6dbd5edb99d77244f6cf836ff.tar.bz2
ENH: Add simple progress reporting during make
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx6
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx4
-rw-r--r--Source/cmake.cxx15
3 files changed, 25 insertions, 0 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 4f53815..4b22f07 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -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);
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 66a69b5..a69ae73 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -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);
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 189e153..84ecc0f 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -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.