From 3e5543c8bcfd6f67b9fe6759c6a32da23a629b85 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 24 Jul 2009 16:53:07 -0400 Subject: [PATCH] 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. --- Source/cmVariableWatchCommand.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/cmVariableWatchCommand.h b/Source/cmVariableWatchCommand.h index 61d6226e8..cca13e219 100644 --- a/Source/cmVariableWatchCommand.h +++ b/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. */