This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, next has been updated via 2d118d7c993b098e9e2ead4bf7f55f25e52cda83 (commit) via 647745b3eedd0036d9e745007acd1d9cc460ccab (commit) via 515f9af0d48be569adb51dfb43ff483cfc0d5156 (commit) from f682040ce7b2f6e4fece048979f5e62f30cdb282 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2d118d7c993b098e9e2ead4bf7f55f25e52cda83 commit 2d118d7c993b098e9e2ead4bf7f55f25e52cda83 Merge: f682040 647745b Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Jun 3 13:24:21 2013 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Mon Jun 3 13:24:21 2013 -0400 Merge topic 'fix-variable_watch-cases' into next 647745b variable_watch: Print accesses as "CMake Debug Log" messages 515f9af variable_watch: Remove leftover debugging code (#14187) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=647745b3eedd0036d9e745007acd1d9cc460ccab commit 647745b3eedd0036d9e745007acd1d9cc460ccab Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Jun 3 13:19:15 2013 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Mon Jun 3 13:19:59 2013 -0400 variable_watch: Print accesses as "CMake Debug Log" messages Use makefile->IssueMessage() to print the unprocessed watch message in a format consistent with other CMake messages and with a more complete call stack for the access. diff --git a/Source/cmVariableWatchCommand.cxx b/Source/cmVariableWatchCommand.cxx index 8532930..297a92b 100644 --- a/Source/cmVariableWatchCommand.cxx +++ b/Source/cmVariableWatchCommand.cxx @@ -117,11 +117,9 @@ void cmVariableWatchCommand::VariableAccessed(const std::string& variable, if ( !processed ) { cmOStringStream msg; - msg << "* Variable \"" << variable.c_str() << "\" was accessed using " - << accessString << " in: " << currentListFile << std::endl; - msg << " The value of the variable: \"" << newValue << "\"" << std::endl; - msg << " The list file stack: " << stack.c_str(); - cmSystemTools::Message(msg.str().c_str()); + msg << "Variable \"" << variable.c_str() << "\" was accessed using " + << accessString << " with value \"" << newValue << "\"."; + makefile->IssueMessage(cmake::LOG, msg.str()); } this->InCallback = false; } diff --git a/Tests/RunCMake/variable_watch/ModifiedAccess-stderr.txt b/Tests/RunCMake/variable_watch/ModifiedAccess-stderr.txt index 3287626..3ff96fc 100644 --- a/Tests/RunCMake/variable_watch/ModifiedAccess-stderr.txt +++ b/Tests/RunCMake/variable_watch/ModifiedAccess-stderr.txt @@ -1,3 +1,4 @@ -\* Variable "b" was accessed using MODIFIED_ACCESS in: .*/Tests/RunCMake/variable_watch/ModifiedAccess.cmake - The value of the variable: "b" - The list file stack: .*/Tests/RunCMake/variable_watch/CMakeLists.txt;.*/Tests/RunCMake/variable_watch/ModifiedAccess.cmake +CMake Debug Log at ModifiedAccess.cmake:3 \(set\): + Variable "b" was accessed using MODIFIED_ACCESS with value "b". +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/variable_watch/NoWatcher-stderr.txt b/Tests/RunCMake/variable_watch/NoWatcher-stderr.txt index 95ff73b..d299429 100644 --- a/Tests/RunCMake/variable_watch/NoWatcher-stderr.txt +++ b/Tests/RunCMake/variable_watch/NoWatcher-stderr.txt @@ -1,4 +1,5 @@ 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$ +CMake Debug Log at NoWatcher.cmake:8 \(set\): + Variable "b" was accessed using MODIFIED_ACCESS with value "". +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=515f9af0d48be569adb51dfb43ff483cfc0d5156 commit 515f9af0d48be569adb51dfb43ff483cfc0d5156 Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Jun 3 13:04:56 2013 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Mon Jun 3 13:13:07 2013 -0400 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 <yyc1...@gmail.com> 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) ----------------------------------------------------------------------- Summary of changes: Source/cmVariableWatchCommand.cxx | 21 ++----------------- .../variable_watch/ModifiedAccess-stderr.txt | 7 +++-- Tests/RunCMake/variable_watch/NoWatcher-stderr.txt | 5 ++++ Tests/RunCMake/variable_watch/NoWatcher.cmake | 8 +++++++ Tests/RunCMake/variable_watch/RunCMakeTest.cmake | 1 + 5 files changed, 21 insertions(+), 21 deletions(-) create mode 100644 Tests/RunCMake/variable_watch/NoWatcher-stderr.txt create mode 100644 Tests/RunCMake/variable_watch/NoWatcher.cmake hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits