[Cmake-commits] [cmake-commits] king committed cmMakefileTargetGenerator.cxx 1.116 1.117 cmMakefileTargetGenerator.h 1.27 1.28 cmake.cxx 1.412 1.413
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Mar 16 16:22:21 EDT 2009
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv6544/Source
Modified Files:
cmMakefileTargetGenerator.cxx cmMakefileTargetGenerator.h
cmake.cxx
Log Message:
ENH: Allow projects to disable per-rule progress
This creates global property RULE_PROGRESS which can be set to disbale
per-rule progress reporting. On Windows, progress reports may cause a
noticable delay due to the cost of starting an extra process. This
feature will allow scripted builds to avoid the cost since they do not
need detailed progress anyway. See issue #8726.
Index: cmMakefileTargetGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -C 2 -d -r1.27 -r1.28
*** cmMakefileTargetGenerator.h 16 Mar 2009 20:22:13 -0000 1.27
--- cmMakefileTargetGenerator.h 16 Mar 2009 20:22:19 -0000 1.28
***************
*** 171,174 ****
--- 171,175 ----
std::string ProgressFileNameFull;
unsigned long NumberOfProgressActions;
+ bool NoRuleProgress;
// the path to the directory the build file is in
Index: cmake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.cxx,v
retrieving revision 1.412
retrieving revision 1.413
diff -C 2 -d -r1.412 -r1.413
*** cmake.cxx 13 Mar 2009 14:53:47 -0000 1.412
--- cmake.cxx 16 Mar 2009 20:22:19 -0000 1.413
***************
*** 3455,3458 ****
--- 3455,3472 ----
"Non-Makefile generators currently ignore this property.");
+ cm->DefineProperty
+ ("RULE_PROGRESS", cmProperty::GLOBAL,
+ "Specify whether to report progress for each make rule.",
+ "Makefile generators add commands to report progress. "
+ "This property specifies whether to report progress on every rule. "
+ "If the property is not set the default is ON. "
+ "Set the property to OFF to disable granular progress and report only "
+ "as each target completes. "
+ "This is intended to allow scripted builds to avoid the build time "
+ "cost of detailed progress reports. "
+ "If a CMAKE_RULE_PROGRESS cache entry exists its value initializes "
+ "the value of this property. "
+ "Non-Makefile generators currently ignore this property.");
+
// ================================================================
// define variables as well
Index: cmMakefileTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.cxx,v
retrieving revision 1.116
retrieving revision 1.117
diff -C 2 -d -r1.116 -r1.117
*** cmMakefileTargetGenerator.cxx 16 Mar 2009 20:22:13 -0000 1.116
--- cmMakefileTargetGenerator.cxx 16 Mar 2009 20:22:19 -0000 1.117
***************
*** 47,50 ****
--- 47,56 ----
static_cast<cmGlobalUnixMakefileGenerator3*>(
this->LocalGenerator->GetGlobalGenerator());
+ cmake* cm = this->GlobalGenerator->GetCMakeInstance();
+ this->NoRuleProgress = false;
+ if(const char* ruleProgress = cm->GetProperty("RULE_PROGRESS"))
+ {
+ this->NoRuleProgress = cmSystemTools::IsOff(ruleProgress);
+ }
}
***************
*** 196,208 ****
cmLocalGenerator::MAKEFILE)
<< "\n\n";
!
! // Include the progress variables for the target.
! *this->BuildFileStream
! << "# Include the progress variables for this target.\n"
! << this->LocalGenerator->IncludeDirective << " "
! << this->Convert(this->ProgressFileNameFull.c_str(),
! cmLocalGenerator::HOME_OUTPUT,
! cmLocalGenerator::MAKEFILE)
! << "\n\n";
// make sure the depend file exists
--- 202,217 ----
cmLocalGenerator::MAKEFILE)
<< "\n\n";
!
! if(!this->NoRuleProgress)
! {
! // Include the progress variables for the target.
! *this->BuildFileStream
! << "# Include the progress variables for this target.\n"
! << this->LocalGenerator->IncludeDirective << " "
! << this->Convert(this->ProgressFileNameFull.c_str(),
! cmLocalGenerator::HOME_OUTPUT,
! cmLocalGenerator::MAKEFILE)
! << "\n\n";
! }
// make sure the depend file exists
***************
*** 1201,1204 ****
--- 1210,1217 ----
{
this->NumberOfProgressActions++;
+ if(this->NoRuleProgress)
+ {
+ return;
+ }
std::string progressDir = this->Makefile->GetHomeOutputDirectory();
progressDir += cmake::GetCMakeFilesDirectory();
More information about the Cmake-commits
mailing list