summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeTests/VariableWatchTest.cmake.in
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2007-04-11 19:13:05 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2007-04-11 19:13:05 (GMT)
commitf9f1ccadb370b7b3466d491b1824104d81a15308 (patch)
tree8428b8e66ce907c5befa5b86fa3fb6773722e8c4 /Tests/CMakeTests/VariableWatchTest.cmake.in
parent76e5344590f6259fcfc73d35e286509f9e260678 (diff)
downloadCMake-f9f1ccadb370b7b3466d491b1824104d81a15308.zip
CMake-f9f1ccadb370b7b3466d491b1824104d81a15308.tar.gz
CMake-f9f1ccadb370b7b3466d491b1824104d81a15308.tar.bz2
ENH: Add variable watch command
Diffstat (limited to 'Tests/CMakeTests/VariableWatchTest.cmake.in')
-rw-r--r--Tests/CMakeTests/VariableWatchTest.cmake.in22
1 files changed, 22 insertions, 0 deletions
diff --git a/Tests/CMakeTests/VariableWatchTest.cmake.in b/Tests/CMakeTests/VariableWatchTest.cmake.in
new file mode 100644
index 0000000..0caeeb0
--- /dev/null
+++ b/Tests/CMakeTests/VariableWatchTest.cmake.in
@@ -0,0 +1,22 @@
+MESSAGE("Start")
+
+VARIABLE_WATCH(TESTVAR MESSAGE)
+VARIABLE_WATCH(TESTVAR1)
+
+macro(testwatch var access file stack)
+ MESSAGE("There was a ${access} access done on the variable: ${var} in file ${file}")
+ MESSAGE("List file stack is: ${stack}")
+endmacro(testwatch)
+
+VARIABLE_WATCH(somevar testwatch)
+
+set(TESTVAR1 "1")
+set(TESTVAR "1")
+set(TESTVAR1 "0")
+set(TESTVAR "0")
+
+
+message("Variable: ${somevar}")
+set(somevar "1")
+message("Variable: ${somevar}")
+remove(somevar)