diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2010-11-15 15:32:15 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2010-11-15 15:32:15 (GMT) |
commit | c18c977ce81d730a870958b591f61a65a16c2758 (patch) | |
tree | d7907bdee6a9a98b965531da6694a0f0afd62965 /Source | |
parent | 3f1121f72260789dd61ce947e208aa182341859e (diff) | |
download | CMake-c18c977ce81d730a870958b591f61a65a16c2758.zip CMake-c18c977ce81d730a870958b591f61a65a16c2758.tar.gz CMake-c18c977ce81d730a870958b591f61a65a16c2758.tar.bz2 |
When checking for variables, specify a reason
Allow reasons to begiven for checking for unused variables.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmMakefile.cxx | 2 | ||||
-rw-r--r-- | Source/cmake.cxx | 5 | ||||
-rw-r--r-- | Source/cmake.h | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 45599d7..9ecc988 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -832,7 +832,7 @@ void cmMakefile::ConfigureFinalPass() l->second.FinishConfigure(); } - this->GetCMakeInstance()->RunCheckForUnusedVariables(); + this->GetCMakeInstance()->RunCheckForUnusedVariables("configure"); } //---------------------------------------------------------------------------- diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 37373ae..5d910d0 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -4494,7 +4494,7 @@ void cmake::WatchUnusedCli(const char* var) #endif } -void cmake::RunCheckForUnusedVariables() const +void cmake::RunCheckForUnusedVariables(const std::string& reason) const { #ifdef CMAKE_BUILD_WITH_CMAKE if(this->WarnUnusedCli) @@ -4506,7 +4506,8 @@ void cmake::RunCheckForUnusedVariables() const if(!it->second) { std::string message = "warning: The variable, '" + it->first + - "', given on the command line, was not used within the build."; + "', given on the command line, was not used during the " + reason + + "."; cmSystemTools::Message(message.c_str()); } } diff --git a/Source/cmake.h b/Source/cmake.h index 9001748..b132164 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -365,7 +365,7 @@ class cmake bool clean); void WatchUnusedCli(const char* var); - void RunCheckForUnusedVariables() const; + void RunCheckForUnusedVariables(const std::string& reason) const; protected: void InitializeProperties(); int HandleDeleteCacheVariables(const char* var); |