summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-07-26 18:55:21 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2011-07-26 18:55:21 (GMT)
commit9340ab28cc551897c2972b4dde1bfe1fc3803635 (patch)
tree13b504a509ca61d6e60b5ff2c11de46f9da176f9 /Source
parent4a18c30a428940e6f78805323b365aab364d85f8 (diff)
parent3e4ba898c17c5366e42c317dc73bf94954ec8d68 (diff)
downloadCMake-9340ab28cc551897c2972b4dde1bfe1fc3803635.zip
CMake-9340ab28cc551897c2972b4dde1bfe1fc3803635.tar.gz
CMake-9340ab28cc551897c2972b4dde1bfe1fc3803635.tar.bz2
Merge topic 'performance_fix'
3e4ba89 Only pay for unused variable checking if it is on.
Diffstat (limited to 'Source')
-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();