diff options
-rw-r--r-- | Source/cmVariableWatchCommand.cxx | 13 | ||||
-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 |
4 files changed, 13 insertions, 13 deletions
diff --git a/Source/cmVariableWatchCommand.cxx b/Source/cmVariableWatchCommand.cxx index a432943..8532930 100644 --- a/Source/cmVariableWatchCommand.cxx +++ b/Source/cmVariableWatchCommand.cxx @@ -122,19 +122,6 @@ void cmVariableWatchCommand::VariableAccessed(const std::string& variable, msg << " The value of the variable: \"" << newValue << "\"" << std::endl; msg << " The list file stack: " << stack.c_str(); cmSystemTools::Message(msg.str().c_str()); - std::vector<std::string> vars = makefile->GetDefinitions(); - cmOStringStream msg2; - size_t cc; - for ( cc = 0; cc < vars.size(); cc ++ ) - { - if ( vars[cc] == variable ) - { - continue; - } - msg2 << vars[cc] << " = \"" - << makefile->GetDefinition(vars[cc].c_str()) << "\"" << std::endl; - } - //cmSystemTools::Message(msg2.str().c_str()); } this->InCallback = false; } 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) |