diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2011-06-21 19:59:10 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2011-06-21 19:59:10 (GMT) |
commit | 3e4ba898c17c5366e42c317dc73bf94954ec8d68 (patch) | |
tree | 064e9aa82ff8b2b4028149242add3ca43804a599 /Source/cmMakefile.cxx | |
parent | 08b109a87f43406f70a125552a2e0aaf54d3b782 (diff) | |
download | CMake-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.cxx | 4 |
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(); |