summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2010-09-02 15:29:05 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2010-09-02 15:29:05 (GMT)
commitd784e6af4d292e5ffee4b43b7ee740d1fa8e2e29 (patch)
treeab20997a3378ac991c9800784423e2d56b7c8a9b /Source/cmake.cxx
parent9efc05722e9598b8e34062e8f39457b728b7286b (diff)
downloadCMake-d784e6af4d292e5ffee4b43b7ee740d1fa8e2e29.zip
CMake-d784e6af4d292e5ffee4b43b7ee740d1fa8e2e29.tar.gz
CMake-d784e6af4d292e5ffee4b43b7ee740d1fa8e2e29.tar.bz2
Run the unused variables check on the final pass
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx34
1 files changed, 19 insertions, 15 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index cb70f1f..b3261c5 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -201,21 +201,6 @@ cmake::cmake()
cmake::~cmake()
{
-#ifdef CMAKE_BUILD_WITH_CMAKE
- if(this->WarnUnusedCli)
- {
- std::map<std::string, bool>::const_iterator it;
- for(it = this->UsedCliVariables.begin(); it != this->UsedCliVariables.end(); ++it)
- {
- if(!it->second)
- {
- std::string message = "warning: The variable, \"" + it->first + "\", given "
- "on the command line, was not used within the build.";
- cmSystemTools::Message(message.c_str());
- }
- }
- }
-#endif
delete this->CacheManager;
delete this->Policies;
if (this->GlobalGenerator)
@@ -4500,3 +4485,22 @@ int cmake::Build(const std::string& dir,
config.c_str(), clean, false, 0, true,
0, nativeOptions);
}
+
+void cmake::RunCheckForUnusedVariables() const
+{
+#ifdef CMAKE_BUILD_WITH_CMAKE
+ if(this->WarnUnusedCli)
+ {
+ std::map<std::string, bool>::const_iterator it;
+ for(it = this->UsedCliVariables.begin(); it != this->UsedCliVariables.end(); ++it)
+ {
+ if(!it->second)
+ {
+ std::string message = "warning: The variable, \"" + it->first + "\", given "
+ "on the command line, was not used within the build.";
+ cmSystemTools::Message(message.c_str());
+ }
+ }
+ }
+#endif
+}