mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-07 04:02:23 +03:00
Only pay for unused variable checking if it is on.
This commit is contained in:
1 parent
08b109a87f
commit
3e4ba898c1
1 file changed
+4
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user