diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2011-01-13 22:58:04 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2011-01-13 22:58:04 (GMT) |
commit | 8354413463fd4b13185388f57dc1b2f5cfd8298d (patch) | |
tree | 9fe8ed2806b629edf0d9ddea3f4700c2a27361a5 /Source | |
parent | 8ed3c85c4749274cd30eef808d585634c38f3c72 (diff) | |
download | CMake-8354413463fd4b13185388f57dc1b2f5cfd8298d.zip CMake-8354413463fd4b13185388f57dc1b2f5cfd8298d.tar.gz CMake-8354413463fd4b13185388f57dc1b2f5cfd8298d.tar.bz2 |
Add method to unwatch a manual variable
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmake.cxx | 8 | ||||
-rw-r--r-- | Source/cmake.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 548e59a..0d1c4ef 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -4309,6 +4309,14 @@ void cmake::WatchUnusedCli(const char* var) #endif } +void cmake::UnwatchUnusedCli(const char* var) +{ +#ifdef CMAKE_BUILD_WITH_CMAKE + this->VariableWatch->RemoveWatch(var, cmWarnUnusedCliWarning); + this->UsedCliVariables[var] = true; +#endif +} + void cmake::RunCheckForUnusedVariables(const std::string& reason) const { #ifdef CMAKE_BUILD_WITH_CMAKE diff --git a/Source/cmake.h b/Source/cmake.h index 4d348bb..1bb42d3 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -366,6 +366,7 @@ class cmake const std::vector<std::string>& nativeOptions, bool clean); + void UnwatchUnusedCli(const char* var); void WatchUnusedCli(const char* var); void RunCheckForUnusedVariables(const std::string& reason) const; protected: |