mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-25 07:58:59 -06:00
Only pay for unused variable checking if it is on.
This commit is contained in:
@@ -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