diff options
author | Ken Martin <ken.martin@kitware.com> | 2003-01-09 16:35:27 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2003-01-09 16:35:27 (GMT) |
commit | bd217452cd9fa24ea537e56dc649f9600dcb2ea8 (patch) | |
tree | a27dc77b804912df0a445379dc6c54ca880f3809 | |
parent | dfa4cbd19e15d6f96a7d8f299b45bfe16de77cc1 (diff) | |
download | CMake-bd217452cd9fa24ea537e56dc649f9600dcb2ea8.zip CMake-bd217452cd9fa24ea537e56dc649f9600dcb2ea8.tar.gz CMake-bd217452cd9fa24ea537e56dc649f9600dcb2ea8.tar.bz2 |
more option on var watches
-rw-r--r-- | Source/cmMakefile.cxx | 15 | ||||
-rw-r--r-- | Source/cmVariableWatch.h | 1 |
2 files changed, 15 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index c26d5ab..b0dfb41 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -921,7 +921,20 @@ const char* cmMakefile::GetDefinition(const char* name) const } else { - vv->VariableAccessed(name, cmVariableWatch::UNKNOWN_VARIABLE_READ_ACCESS); + // are unknown access allowed + DefinitionMap::const_iterator pos2 = + m_Definitions.find("CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS"); + if (pos2 != m_Definitions.end() && + cmSystemTools::IsOn((*pos2).second.c_str())) + { + vv->VariableAccessed(name, + cmVariableWatch::ALLOWED_UNKNOWN_VARIABLE_READ_ACCESS); + } + else + { + vv->VariableAccessed(name, cmVariableWatch:: + UNKNOWN_VARIABLE_READ_ACCESS); + } } } return def; diff --git a/Source/cmVariableWatch.h b/Source/cmVariableWatch.h index db85371..9a978bd 100644 --- a/Source/cmVariableWatch.h +++ b/Source/cmVariableWatch.h @@ -49,6 +49,7 @@ public: { VARIABLE_READ_ACCESS, UNKNOWN_VARIABLE_READ_ACCESS, + ALLOWED_UNKNOWN_VARIABLE_READ_ACCESS, VARIABLE_MODIFIED_ACCESS, VARIABLE_REMOVED_ACCESS, NO_ACCESS |