Merge topic 'variable_watch-no-allowed-access'

d8498003 variable_watch: Remove undocumented and redundant access type
This commit is contained in:
Brad King 2014-05-27 09:46:32 -04:00 committed by CMake Topic Stage
commit 03a3ee222b
4 changed files with 9 additions and 14 deletions

View File

@ -0,0 +1,8 @@
variable_watch-no-allowed-access
--------------------------------
* Callbacks established by the :command:`variable_watch` command will no
longer receive the ``ALLOWED_UNKNOWN_READ_ACCESS`` access type when
the undocumented ``CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS`` variable is
set. Uninitialized variable accesses will always be reported as
``UNKNOWN_READ_ACCESS``.

View File

@ -2472,19 +2472,8 @@ const char* cmMakefile::GetDefinition(const std::string& name) const
} }
else else
{ {
// are unknown access allowed vv->VariableAccessed(name,
const char* allow = this->Internal->VarStack.top()
.Get("CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS");
if(cmSystemTools::IsOn(allow))
{
vv->VariableAccessed(name,
cmVariableWatch::ALLOWED_UNKNOWN_VARIABLE_READ_ACCESS, def, this);
}
else
{
vv->VariableAccessed(name,
cmVariableWatch::UNKNOWN_VARIABLE_READ_ACCESS, def, this); cmVariableWatch::UNKNOWN_VARIABLE_READ_ACCESS, def, this);
}
} }
} }
#endif #endif

View File

@ -16,7 +16,6 @@ static const char* const cmVariableWatchAccessStrings[] =
"READ_ACCESS", "READ_ACCESS",
"UNKNOWN_READ_ACCESS", "UNKNOWN_READ_ACCESS",
"UNKNOWN_DEFINED_ACCESS", "UNKNOWN_DEFINED_ACCESS",
"ALLOWED_UNKNOWN_READ_ACCESS",
"MODIFIED_ACCESS", "MODIFIED_ACCESS",
"REMOVED_ACCESS", "REMOVED_ACCESS",
"NO_ACCESS" "NO_ACCESS"

View File

@ -53,7 +53,6 @@ public:
VARIABLE_READ_ACCESS = 0, VARIABLE_READ_ACCESS = 0,
UNKNOWN_VARIABLE_READ_ACCESS, UNKNOWN_VARIABLE_READ_ACCESS,
UNKNOWN_VARIABLE_DEFINED_ACCESS, UNKNOWN_VARIABLE_DEFINED_ACCESS,
ALLOWED_UNKNOWN_VARIABLE_READ_ACCESS,
VARIABLE_MODIFIED_ACCESS, VARIABLE_MODIFIED_ACCESS,
VARIABLE_REMOVED_ACCESS, VARIABLE_REMOVED_ACCESS,
NO_ACCESS NO_ACCESS