From 8354413463fd4b13185388f57dc1b2f5cfd8298d Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 13 Jan 2011 17:58:04 -0500 Subject: Add method to unwatch a manual variable --- Source/cmake.cxx | 8 ++++++++ Source/cmake.h | 1 + 2 files changed, 9 insertions(+) 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& nativeOptions, bool clean); + void UnwatchUnusedCli(const char* var); void WatchUnusedCli(const char* var); void RunCheckForUnusedVariables(const std::string& reason) const; protected: -- cgit v0.12