Ben Boeckel f9bb20fe2b variable_watch: Don't share memory for callbacks
The command itself is owned by the cmMakefile class, but the
cmVariableWatch which holds a pointer to the cmVariableWatchCommand via
the client_data for the callback outlives the cmMakefile class in the Qt
GUI. This means that when the cmMakefile is destroyed, the variable
watch is still in effect, but with a stale pointer.

To fix this, each callback is now a separate entity completely and
doesn't rely on the command which spawned it at all.

An example CMakeLists.txt which demonstrates the issue (only displayed
in cmake-gui, so no tests can be written for it):

    set(var 0)
    variable_watch(var)
2013-08-08 13:31:10 -04:00
..
2013-07-22 09:48:32 -04:00
2013-05-16 14:38:07 -04:00
2013-07-16 13:59:30 -04:00
2013-07-31 08:48:19 -04:00
2013-08-02 00:01:12 -04:00
2013-05-22 12:52:12 -04:00
2013-05-16 19:33:13 +02:00
2011-09-15 16:20:33 +02:00
2012-09-28 17:00:52 -04:00
2012-09-28 17:00:52 -04:00
2013-07-16 13:59:07 -04:00
2012-02-02 23:40:21 +00:00
2013-07-31 08:48:19 -04:00
2013-08-01 00:36:11 +02:00
2012-02-21 15:33:31 -05:00