diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2010-09-22 16:42:49 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2010-09-22 16:46:16 (GMT) |
commit | 33c63b19ab4f192f95c72735d810ef3921370d1f (patch) | |
tree | a0ee2d98453a7eb03c0d392603c731d1eda1663e /Source/cmake.cxx | |
parent | 535253f38598d6dd46aca944a82cfe1684b2f07f (diff) | |
download | CMake-33c63b19ab4f192f95c72735d810ef3921370d1f.zip CMake-33c63b19ab4f192f95c72735d810ef3921370d1f.tar.gz CMake-33c63b19ab4f192f95c72735d810ef3921370d1f.tar.bz2 |
Add a method to put a watch for variables
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 007f52d..cb68f221 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -380,10 +380,7 @@ bool cmake::SetCacheArgs(const std::vector<std::string>& args) "No help, variable specified on the command line.", type); if(this->WarnUnusedCli) { -#ifdef CMAKE_BUILD_WITH_CMAKE - this->VariableWatch->AddWatch(var, cmWarnUnusedCliWarning, this); - this->UsedCliVariables[var] = false; -#endif + this->WatchUnusedCli(var.c_str()); } } else @@ -4488,6 +4485,14 @@ int cmake::Build(const std::string& dir, 0, nativeOptions); } +void cmake::WatchUnusedCli(const char* var) +{ +#ifdef CMAKE_BUILD_WITH_CMAKE + this->VariableWatch->AddWatch(var, cmWarnUnusedCliWarning, this); + this->UsedCliVariables[var] = false; +#endif +} + void cmake::RunCheckForUnusedVariables() const { #ifdef CMAKE_BUILD_WITH_CMAKE |