Browse Source

BUG: Keep variable_watch() commands in memory

The "Keep only FinalPass commands in memory" commit caused instances of
this command to be deleted after the InitialPass.  Even though the
variable_watch command does not have a final pass, it does need to stay
alive because it owns the callback information.
Brad King 16 years ago
parent
commit
3e5543c8bc
1 changed files with 4 additions and 0 deletions
  1. 4 0
      Source/cmVariableWatchCommand.h

+ 4 - 0
Source/cmVariableWatchCommand.h

@@ -56,6 +56,10 @@ public:
    */
   virtual bool IsScriptable() { return true; }
 
+  /** This command does not really have a final pass but it needs to
+      stay alive since it owns variable watch callback information. */
+  virtual bool HasFinalPass() const { return true; }
+
   /**
    * The name of the command as specified in CMakeList.txt.
    */