[Cmake-commits] [cmake-commits] king committed cmMakefileExecutableTargetGenerator.cxx 1.54 1.55 cmMakefileLibraryTargetGenerator.cxx 1.70 1.71 cmMakefileTargetGenerator.cxx 1.117 1.118 cmMakefileTargetGenerator.h 1.28 1.29 cmake.cxx 1.413 1.414

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Mar 16 16:56:01 EDT 2009


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv9355a/Source

Modified Files:
	cmMakefileExecutableTargetGenerator.cxx 
	cmMakefileLibraryTargetGenerator.cxx 
	cmMakefileTargetGenerator.cxx cmMakefileTargetGenerator.h 
	cmake.cxx 
Log Message:
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.


Index: cmMakefileLibraryTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileLibraryTargetGenerator.cxx,v
retrieving revision 1.70
retrieving revision 1.71
diff -C 2 -d -r1.70 -r1.71
*** cmMakefileLibraryTargetGenerator.cxx	16 Mar 2009 20:55:53 -0000	1.70
--- cmMakefileLibraryTargetGenerator.cxx	16 Mar 2009 20:55:58 -0000	1.71
***************
*** 449,473 ****
                    cmLocalGenerator::SHELL);
  
!   // Add the link message.
!   std::string buildEcho = "Linking ";
!   buildEcho += linkLanguage;
!   switch(this->Target->GetType())
      {
!     case cmTarget::STATIC_LIBRARY:
!       buildEcho += " static library "; 
!       break;
!     case cmTarget::SHARED_LIBRARY:
!       buildEcho += " shared library ";
!       break;
!     case cmTarget::MODULE_LIBRARY:
!       buildEcho += " shared module ";
!       break;
!     default:
!       buildEcho += " library "; 
!       break;
      }
-   buildEcho += targetOutPath.c_str();
-   this->LocalGenerator->AppendEcho(commands, buildEcho.c_str(),
-                                    cmLocalUnixMakefileGenerator3::EchoLink);
  
    const char* forbiddenFlagVar = 0;
--- 449,476 ----
                    cmLocalGenerator::SHELL);
  
!   if(!this->NoRuleMessages)
      {
!     // Add the link message.
!     std::string buildEcho = "Linking ";
!     buildEcho += linkLanguage;
!     switch(this->Target->GetType())
!       {
!       case cmTarget::STATIC_LIBRARY:
!         buildEcho += " static library ";
!         break;
!       case cmTarget::SHARED_LIBRARY:
!         buildEcho += " shared library ";
!         break;
!       case cmTarget::MODULE_LIBRARY:
!         buildEcho += " shared module ";
!         break;
!       default:
!         buildEcho += " library ";
!         break;
!       }
!     buildEcho += targetOutPath.c_str();
!     this->LocalGenerator->AppendEcho(commands, buildEcho.c_str(),
!                                      cmLocalUnixMakefileGenerator3::EchoLink);
      }
  
    const char* forbiddenFlagVar = 0;

Index: cmMakefileTargetGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -C 2 -d -r1.28 -r1.29
*** cmMakefileTargetGenerator.h	16 Mar 2009 20:22:19 -0000	1.28
--- cmMakefileTargetGenerator.h	16 Mar 2009 20:55:58 -0000	1.29
***************
*** 171,175 ****
    std::string ProgressFileNameFull;
    unsigned long NumberOfProgressActions;
!   bool NoRuleProgress;
  
    // the path to the directory the build file is in
--- 171,175 ----
    std::string ProgressFileNameFull;
    unsigned long NumberOfProgressActions;
!   bool NoRuleMessages;
  
    // the path to the directory the build file is in

Index: cmMakefileExecutableTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileExecutableTargetGenerator.cxx,v
retrieving revision 1.54
retrieving revision 1.55
diff -C 2 -d -r1.54 -r1.55
*** cmMakefileExecutableTargetGenerator.cxx	10 Feb 2009 13:51:13 -0000	1.54
--- cmMakefileExecutableTargetGenerator.cxx	16 Mar 2009 20:55:58 -0000	1.55
***************
*** 190,200 ****
      }
  
!   // Add the link message.
!   std::string buildEcho = "Linking ";
!   buildEcho += linkLanguage;
!   buildEcho += " executable ";
!   buildEcho += targetOutPath;
!   this->LocalGenerator->AppendEcho(commands, buildEcho.c_str(),
!                                    cmLocalUnixMakefileGenerator3::EchoLink);
  
    // Build a list of compiler flags and linker flags.
--- 190,203 ----
      }
  
!   if(!this->NoRuleMessages)
!     {
!     // Add the link message.
!     std::string buildEcho = "Linking ";
!     buildEcho += linkLanguage;
!     buildEcho += " executable ";
!     buildEcho += targetOutPath;
!     this->LocalGenerator->AppendEcho(commands, buildEcho.c_str(),
!                                      cmLocalUnixMakefileGenerator3::EchoLink);
!     }
  
    // Build a list of compiler flags and linker flags.

Index: cmake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.cxx,v
retrieving revision 1.413
retrieving revision 1.414
diff -C 2 -d -r1.413 -r1.414
*** cmake.cxx	16 Mar 2009 20:22:19 -0000	1.413
--- cmake.cxx	16 Mar 2009 20:55:58 -0000	1.414
***************
*** 3456,3469 ****
  
    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.");
--- 3456,3469 ----
  
    cm->DefineProperty
!     ("RULE_MESSAGES", cmProperty::GLOBAL,
!      "Specify whether to report a message for each make rule.",
!      "This property specifies whether Makefile generators should add a "
!      "progress message describing what each build rule does.  "
       "If the property is not set the default is ON.  "
!      "Set the property to OFF to disable granular messages and report only "
       "as each target completes.  "
       "This is intended to allow scripted builds to avoid the build time "
!      "cost of detailed reports.  "
!      "If a CMAKE_RULE_MESSAGES cache entry exists its value initializes "
       "the value of this property.  "
       "Non-Makefile generators currently ignore this property.");

Index: cmMakefileTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.cxx,v
retrieving revision 1.117
retrieving revision 1.118
diff -C 2 -d -r1.117 -r1.118
*** cmMakefileTargetGenerator.cxx	16 Mar 2009 20:22:19 -0000	1.117
--- cmMakefileTargetGenerator.cxx	16 Mar 2009 20:55:58 -0000	1.118
***************
*** 48,55 ****
        this->LocalGenerator->GetGlobalGenerator());
    cmake* cm = this->GlobalGenerator->GetCMakeInstance();
!   this->NoRuleProgress = false;
!   if(const char* ruleProgress = cm->GetProperty("RULE_PROGRESS"))
      {
!     this->NoRuleProgress = cmSystemTools::IsOff(ruleProgress);
      }
  }
--- 48,55 ----
        this->LocalGenerator->GetGlobalGenerator());
    cmake* cm = this->GlobalGenerator->GetCMakeInstance();
!   this->NoRuleMessages = false;
!   if(const char* ruleStatus = cm->GetProperty("RULE_MESSAGES"))
      {
!     this->NoRuleMessages = cmSystemTools::IsOff(ruleStatus);
      }
  }
***************
*** 203,207 ****
      << "\n\n";
  
!   if(!this->NoRuleProgress)
      {
      // Include the progress variables for the target.
--- 203,207 ----
      << "\n\n";
  
!   if(!this->NoRuleMessages)
      {
      // Include the progress variables for the target.
***************
*** 592,601 ****
    this->AppendProgress(commands);
  
!   std::string buildEcho = "Building ";
!   buildEcho += lang;
!   buildEcho += " object ";
!   buildEcho += relativeObj;
!   this->LocalGenerator->AppendEcho(commands, buildEcho.c_str(),
!                                    cmLocalUnixMakefileGenerator3::EchoBuild);
  
    std::string targetOutPathPDB;
--- 592,604 ----
    this->AppendProgress(commands);
  
!   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;
***************
*** 1107,1113 ****
      // add in a progress call if needed
      this->AppendProgress(commands);
!     this->LocalGenerator
!       ->AppendEcho(commands, comment.c_str(),
!                    cmLocalUnixMakefileGenerator3::EchoGenerate);
      }
  
--- 1110,1119 ----
      // add in a progress call if needed
      this->AppendProgress(commands);
!     if(!this->NoRuleMessages)
!       {
!       this->LocalGenerator
!         ->AppendEcho(commands, comment.c_str(),
!                      cmLocalUnixMakefileGenerator3::EchoGenerate);
!       }
      }
  
***************
*** 1210,1214 ****
  {
    this->NumberOfProgressActions++;
!   if(this->NoRuleProgress)
      {
      return;
--- 1216,1220 ----
  {
    this->NumberOfProgressActions++;
!   if(this->NoRuleMessages)
      {
      return;



More information about the Cmake-commits mailing list