From 6aa0c214054252d1fc94e5b8e6b6ffc3eae4c08b Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 6 Aug 2013 14:31:28 -0400 Subject: [PATCH] variable_watch: Add test for watching a variable multiple times --- Tests/RunCMake/variable_watch/RunCMakeTest.cmake | 1 + Tests/RunCMake/variable_watch/WatchTwice-stderr.txt | 2 ++ Tests/RunCMake/variable_watch/WatchTwice.cmake | 11 +++++++++++ 3 files changed, 14 insertions(+) create mode 100644 Tests/RunCMake/variable_watch/WatchTwice-stderr.txt create mode 100644 Tests/RunCMake/variable_watch/WatchTwice.cmake diff --git a/Tests/RunCMake/variable_watch/RunCMakeTest.cmake b/Tests/RunCMake/variable_watch/RunCMakeTest.cmake index 8d2047673..9becb4cd7 100644 --- a/Tests/RunCMake/variable_watch/RunCMakeTest.cmake +++ b/Tests/RunCMake/variable_watch/RunCMakeTest.cmake @@ -2,3 +2,4 @@ include(RunCMake) run_cmake(ModifiedAccess) run_cmake(NoWatcher) +run_cmake(WatchTwice) diff --git a/Tests/RunCMake/variable_watch/WatchTwice-stderr.txt b/Tests/RunCMake/variable_watch/WatchTwice-stderr.txt new file mode 100644 index 000000000..fa7d3472a --- /dev/null +++ b/Tests/RunCMake/variable_watch/WatchTwice-stderr.txt @@ -0,0 +1,2 @@ +From watch1 +From watch2 diff --git a/Tests/RunCMake/variable_watch/WatchTwice.cmake b/Tests/RunCMake/variable_watch/WatchTwice.cmake new file mode 100644 index 000000000..540cfc160 --- /dev/null +++ b/Tests/RunCMake/variable_watch/WatchTwice.cmake @@ -0,0 +1,11 @@ +function (watch1) + message("From watch1") +endfunction () + +function (watch2) + message("From watch2") +endfunction () + +variable_watch(watched watch1) +variable_watch(watched watch2) +set(access "${watched}")