diff options
author | Brad King <brad.king@kitware.com> | 2013-06-03 17:04:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-06-03 17:13:07 (GMT) |
commit | 515f9af0d48be569adb51dfb43ff483cfc0d5156 (patch) | |
tree | 544452bf751f1e8f3028dcd0b08b0f4a8386eb24 /Tests/RunCMake/variable_watch | |
parent | c63d30048bcf5bd6efa1e038b36c5efd29e34749 (diff) | |
download | CMake-515f9af0d48be569adb51dfb43ff483cfc0d5156.zip CMake-515f9af0d48be569adb51dfb43ff483cfc0d5156.tar.gz CMake-515f9af0d48be569adb51dfb43ff483cfc0d5156.tar.bz2 |
variable_watch: Remove leftover debugging code (#14187)
When a watch does not specify a command to call then variable_watch
prints out a message to stderr. Remove code after that which collects
all variable values to construct a message that is never printed.
Otherwise such code causes a READ_ACCESS watch to trigger on all
variables in the currents scope.
Reported-by: Yichao Yu <yyc1992@gmail.com>
Diffstat (limited to 'Tests/RunCMake/variable_watch')
-rw-r--r-- | Tests/RunCMake/variable_watch/NoWatcher-stderr.txt | 4 | ||||
-rw-r--r-- | Tests/RunCMake/variable_watch/NoWatcher.cmake | 8 | ||||
-rw-r--r-- | Tests/RunCMake/variable_watch/RunCMakeTest.cmake | 1 |
3 files changed, 13 insertions, 0 deletions
diff --git a/Tests/RunCMake/variable_watch/NoWatcher-stderr.txt b/Tests/RunCMake/variable_watch/NoWatcher-stderr.txt new file mode 100644 index 0000000..95ff73b --- /dev/null +++ b/Tests/RunCMake/variable_watch/NoWatcher-stderr.txt @@ -0,0 +1,4 @@ +my_func +\* Variable "b" was accessed using MODIFIED_ACCESS in: .*/Tests/RunCMake/variable_watch/NoWatcher.cmake + The value of the variable: "" + The list file stack: .*/Tests/RunCMake/variable_watch/CMakeLists.txt;.*/Tests/RunCMake/variable_watch/NoWatcher.cmake$ diff --git a/Tests/RunCMake/variable_watch/NoWatcher.cmake b/Tests/RunCMake/variable_watch/NoWatcher.cmake new file mode 100644 index 0000000..8a68efb --- /dev/null +++ b/Tests/RunCMake/variable_watch/NoWatcher.cmake @@ -0,0 +1,8 @@ +function(my_func) + message("my_func") +endfunction() +variable_watch(a my_func) +set(a "") + +variable_watch(b) +set(b "") diff --git a/Tests/RunCMake/variable_watch/RunCMakeTest.cmake b/Tests/RunCMake/variable_watch/RunCMakeTest.cmake index 1dd7688..8d20476 100644 --- a/Tests/RunCMake/variable_watch/RunCMakeTest.cmake +++ b/Tests/RunCMake/variable_watch/RunCMakeTest.cmake @@ -1,3 +1,4 @@ include(RunCMake) run_cmake(ModifiedAccess) +run_cmake(NoWatcher) |