summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/variable_watch/RaiseInParentScope.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/variable_watch/RaiseInParentScope.cmake')
-rw-r--r--Tests/RunCMake/variable_watch/RaiseInParentScope.cmake15
1 files changed, 15 insertions, 0 deletions
diff --git a/Tests/RunCMake/variable_watch/RaiseInParentScope.cmake b/Tests/RunCMake/variable_watch/RaiseInParentScope.cmake
new file mode 100644
index 0000000..207798e
--- /dev/null
+++ b/Tests/RunCMake/variable_watch/RaiseInParentScope.cmake
@@ -0,0 +1,15 @@
+
+function(watch variable access value)
+ message("${variable} ${access} ${value}")
+endfunction ()
+
+# --------------
+
+variable_watch(var watch)
+set(var "a")
+
+function(f)
+ set(var "b" PARENT_SCOPE)
+endfunction(f)
+
+f()