[cmake-developers] [CMake 0014187]: variable_watch with no command name will cause READ_ACCESS for all variables in the current scope.

Mantis Bug Tracker mantis at public.kitware.com
Sun Jun 2 18:18:27 EDT 2013


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=14187 
====================================================================== 
Reported By:                Yichao Yu
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14187
Category:                   (No Category)
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2013-06-02 18:18 EDT
Last Modified:              2013-06-02 18:18 EDT
====================================================================== 
Summary:                    variable_watch with no command name will cause
READ_ACCESS for all variables in the current scope.
Description: 
When a variable that is being watched by variable_watch with no command name is
accessed, not only a message is printed out but all other variables in the
current scope will feel an READ_ACCESS and therefore execute watch commands on
them.

Steps to Reproduce: 
function(my_func)
  message("my_func")
endfunction()
variable_watch(a my_func)
set(a "")

variable_watch(b)
set(b "")

expected output:

my_func
* Variable "b" was accessed using REMOVED_ACCESS in: ....
  The value of the variable: ""
  The list file stack: ...

actual output:

my_func
* Variable "b" was accessed using REMOVED_ACCESS in: ....
  The value of the variable: ""
  The list file stack: ...
my_func

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-06-02 18:18 Yichao Yu      New Issue                                    
======================================================================




More information about the cmake-developers mailing list