Add method to unwatch a manual variable

This commit is contained in:
Ben Boeckel 2011-01-13 17:58:04 -05:00
parent 8ed3c85c47
commit 8354413463
2 changed files with 9 additions and 0 deletions

View File

@ -4309,6 +4309,14 @@ void cmake::WatchUnusedCli(const char* var)
#endif #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 void cmake::RunCheckForUnusedVariables(const std::string& reason) const
{ {
#ifdef CMAKE_BUILD_WITH_CMAKE #ifdef CMAKE_BUILD_WITH_CMAKE

View File

@ -366,6 +366,7 @@ class cmake
const std::vector<std::string>& nativeOptions, const std::vector<std::string>& nativeOptions,
bool clean); bool clean);
void UnwatchUnusedCli(const char* var);
void WatchUnusedCli(const char* var); void WatchUnusedCli(const char* var);
void RunCheckForUnusedVariables(const std::string& reason) const; void RunCheckForUnusedVariables(const std::string& reason) const;
protected: protected: