summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2011-06-21 19:59:10 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2011-06-21 19:59:10 (GMT)
commit3e4ba898c17c5366e42c317dc73bf94954ec8d68 (patch)
tree064e9aa82ff8b2b4028149242add3ca43804a599 /Source/cmMakefile.cxx
parent08b109a87f43406f70a125552a2e0aaf54d3b782 (diff)
downloadCMake-3e4ba898c17c5366e42c317dc73bf94954ec8d68.zip
CMake-3e4ba898c17c5366e42c317dc73bf94954ec8d68.tar.gz
CMake-3e4ba898c17c5366e42c317dc73bf94954ec8d68.tar.bz2
Only pay for unused variable checking if it is on.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 63bf03b..014ef67 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1759,6 +1759,10 @@ void cmMakefile::AddDefinition(const char* name, bool value)
void cmMakefile::CheckForUnusedVariables() const
{
+ if (!this->WarnUnused)
+ {
+ return;
+ }
const cmDefinitions& defs = this->Internal->VarStack.top();
const std::set<cmStdString>& locals = defs.LocalKeys();
std::set<cmStdString>::const_iterator it = locals.begin();