summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-03-16 20:55:58 (GMT)
committerBrad King <brad.king@kitware.com>2009-03-16 20:55:58 (GMT)
commit493f88ce553ec7e39db83bd1bdf5c0896420c52d (patch)
tree12ff5faa0dff23b7e0b667a30da972d0d7673744 /Source/cmMakefileTargetGenerator.cxx
parent49dec94f54c6c896b2d42f6bea0b36bd429693c9 (diff)
downloadCMake-493f88ce553ec7e39db83bd1bdf5c0896420c52d.zip
CMake-493f88ce553ec7e39db83bd1bdf5c0896420c52d.tar.gz
CMake-493f88ce553ec7e39db83bd1bdf5c0896420c52d.tar.bz2
ENH: Allow projects to disable per-rule echo lines
This creates global property RULE_MESSAGES which can be set to disbale per-rule progress and action reporting. On Windows, these reports may cause a noticable delay due to the cost of starting extra processes. This feature will allow scripted builds to avoid the cost since they do not need detailed information anyway. This replaces the RULE_PROGRESS property created earlier as it is more complete. See issue #8726.
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileTargetGenerator.cxx34
1 files changed, 20 insertions, 14 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index b88abed..4b9c724 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -47,10 +47,10 @@ cmMakefileTargetGenerator::cmMakefileTargetGenerator(cmTarget* target)
static_cast<cmGlobalUnixMakefileGenerator3*>(
this->LocalGenerator->GetGlobalGenerator());
cmake* cm = this->GlobalGenerator->GetCMakeInstance();
- this->NoRuleProgress = false;
- if(const char* ruleProgress = cm->GetProperty("RULE_PROGRESS"))
+ this->NoRuleMessages = false;
+ if(const char* ruleStatus = cm->GetProperty("RULE_MESSAGES"))
{
- this->NoRuleProgress = cmSystemTools::IsOff(ruleProgress);
+ this->NoRuleMessages = cmSystemTools::IsOff(ruleStatus);
}
}
@@ -202,7 +202,7 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules()
cmLocalGenerator::MAKEFILE)
<< "\n\n";
- if(!this->NoRuleProgress)
+ if(!this->NoRuleMessages)
{
// Include the progress variables for the target.
*this->BuildFileStream
@@ -591,12 +591,15 @@ cmMakefileTargetGenerator
// add in a progress call if needed
this->AppendProgress(commands);
- std::string buildEcho = "Building ";
- buildEcho += lang;
- buildEcho += " object ";
- buildEcho += relativeObj;
- this->LocalGenerator->AppendEcho(commands, buildEcho.c_str(),
- cmLocalUnixMakefileGenerator3::EchoBuild);
+ if(!this->NoRuleMessages)
+ {
+ std::string buildEcho = "Building ";
+ buildEcho += lang;
+ buildEcho += " object ";
+ buildEcho += relativeObj;
+ this->LocalGenerator->AppendEcho
+ (commands, buildEcho.c_str(), cmLocalUnixMakefileGenerator3::EchoBuild);
+ }
std::string targetOutPathPDB;
{
@@ -1106,9 +1109,12 @@ void cmMakefileTargetGenerator
{
// add in a progress call if needed
this->AppendProgress(commands);
- this->LocalGenerator
- ->AppendEcho(commands, comment.c_str(),
- cmLocalUnixMakefileGenerator3::EchoGenerate);
+ if(!this->NoRuleMessages)
+ {
+ this->LocalGenerator
+ ->AppendEcho(commands, comment.c_str(),
+ cmLocalUnixMakefileGenerator3::EchoGenerate);
+ }
}
// Now append the actual user-specified commands.
@@ -1209,7 +1215,7 @@ void
cmMakefileTargetGenerator::AppendProgress(std::vector<std::string>& commands)
{
this->NumberOfProgressActions++;
- if(this->NoRuleProgress)
+ if(this->NoRuleMessages)
{
return;
}