[Cmake-commits] CMake branch, next, updated. v3.7.0-rc2-706-g1732d14

Brad King brad.king at kitware.com
Mon Oct 24 10:19:33 EDT 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  1732d1498b32e173dcf9642964fd7128f04397d0 (commit)
       via  c401f95888938562881cd5d7c21ccea5974fe130 (commit)
      from  c9c61385c9710e273c2287a0d5ced8080e5bc908 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1732d1498b32e173dcf9642964fd7128f04397d0
commit 1732d1498b32e173dcf9642964fd7128f04397d0
Merge: c9c6138 c401f95
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Oct 24 10:19:32 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Oct 24 10:19:32 2016 -0400

    Merge topic 'cmcommand-no-disable' into next
    
    c401f958 Remove cmCommand::Enabled and all related accessors


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c401f95888938562881cd5d7c21ccea5974fe130
commit c401f95888938562881cd5d7c21ccea5974fe130
Author:     Daniel Pfeifer <daniel at pfeifer-mail.de>
AuthorDate: Sun Oct 23 08:55:19 2016 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Oct 24 10:19:09 2016 -0400

    Remove cmCommand::Enabled and all related accessors
    
    Enabled is never set to false.  Remove the member variable and all
    related getters and setters.

diff --git a/Source/cmCommand.h b/Source/cmCommand.h
index 65bb7c5..b263a61 100644
--- a/Source/cmCommand.h
+++ b/Source/cmCommand.h
@@ -23,11 +23,10 @@ class cmCommand
 {
 public:
   /**
-   * Construct the command. By default it is enabled with no makefile.
+   * Construct the command. By default it has no makefile.
    */
   cmCommand()
     : Makefile(CM_NULLPTR)
-    , Enabled(true)
   {
   }
 
@@ -92,26 +91,6 @@ public:
   virtual std::string GetName() const = 0;
 
   /**
-   * Enable the command.
-   */
-  void EnabledOn() { this->Enabled = true; }
-
-  /**
-   * Disable the command.
-   */
-  void EnabledOff() { this->Enabled = false; }
-
-  /**
-   * Query whether the command is enabled.
-   */
-  bool GetEnabled() const { return this->Enabled; }
-
-  /**
-   * Disable or enable the command.
-   */
-  void SetEnabled(bool enabled) { this->Enabled = enabled; }
-
-  /**
    * Return the last error string.
    */
   const char* GetError();
@@ -129,7 +108,6 @@ protected:
   cmCommandArgumentsHelper Helper;
 
 private:
-  bool Enabled;
   std::string Error;
 };
 
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 00c0e82..741ffb8 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -266,7 +266,7 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff,
     pcmd->SetMakefile(this);
 
     // Decide whether to invoke the command.
-    if (pcmd->GetEnabled() && !cmSystemTools::GetFatalErrorOccured() &&
+    if (!cmSystemTools::GetFatalErrorOccured() &&
         (this->GetCMakeInstance()->GetWorkingMode() != cmake::SCRIPT_MODE ||
          pcmd->IsScriptable()))
 

-----------------------------------------------------------------------

Summary of changes:
 Source/cmCommand.h    |   24 +-----------------------
 Source/cmMakefile.cxx |    2 +-
 2 files changed, 2 insertions(+), 24 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list