summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Source/cmMakefile.cxx16
-rw-r--r--Source/cmMakefile.h2
-rw-r--r--Source/cmake.cxx10
-rw-r--r--Source/cmake.h6
-rw-r--r--Source/cmakemain.cxx4
5 files changed, 19 insertions, 19 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index e4973cb5bf..214c8becef 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -92,7 +92,7 @@ cmMakefile::cmMakefile(): Internal(new Internals)
this->AddDefaultDefinitions();
this->Initialize();
this->PreOrder = false;
- this->FindUnused = false;
+ this->WarnUnused = false;
this->DefaultToUsed = false;
}
@@ -136,7 +136,7 @@ cmMakefile::cmMakefile(const cmMakefile& mf): Internal(new Internals)
this->SubDirectoryOrder = mf.SubDirectoryOrder;
this->Properties = mf.Properties;
this->PreOrder = mf.PreOrder;
- this->FindUnused = mf.FindUnused;
+ this->WarnUnused = mf.WarnUnused;
this->DefaultToUsed = mf.DefaultToUsed;
this->ListFileStack = mf.ListFileStack;
this->Initialize();
@@ -766,9 +766,9 @@ void cmMakefile::SetLocalGenerator(cmLocalGenerator* lg)
{
const cmDefinitions& defs = cmDefinitions();
const std::set<cmStdString> globalKeys = defs.LocalKeys();
- this->FindUnused = this->GetCMakeInstance()->GetFindUnused();
+ this->WarnUnused = this->GetCMakeInstance()->GetWarnUnused();
this->DefaultToUsed = this->GetCMakeInstance()->GetDefaultToUsed();
- if (this->FindUnused)
+ if (this->WarnUnused)
{
this->Internal->VarUsageStack.push(globalKeys);
}
@@ -1710,7 +1710,7 @@ void cmMakefile::AddDefinition(const char* name, bool value)
{
this->Internal->VarStack.top().Set(name, value? "ON" : "OFF");
this->Internal->VarInitStack.top().insert(name);
- if (this->FindUnused && this->DefaultToUsed)
+ if (this->WarnUnused && this->DefaultToUsed)
{
this->Internal->VarUsageStack.top().insert(name);
}
@@ -1756,7 +1756,7 @@ void cmMakefile::RemoveDefinition(const char* name)
this->Internal->VarStack.top().Set(name, 0);
this->Internal->VarRemoved.insert(name);
this->Internal->VarInitStack.top().insert(name);
- if (this->FindUnused)
+ if (this->WarnUnused)
{
this->Internal->VarUsageStack.top().insert(name);
}
@@ -2138,7 +2138,7 @@ const char* cmMakefile::GetDefinition(const char* name) const
RecordPropertyAccess(name,cmProperty::VARIABLE);
}
#endif
- if (this->FindUnused)
+ if (this->WarnUnused)
{
this->Internal->VarUsageStack.top().insert(name);
}
@@ -3391,7 +3391,7 @@ void cmMakefile::PopScope()
for (; it != locals.end(); ++it)
{
init.erase(*it);
- if (this->FindUnused && usage.find(*it) == usage.end())
+ if (this->WarnUnused && usage.find(*it) == usage.end())
{
cmOStringStream m;
m << "unused variable \'" << *it << "\'";
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 184253a660..7141747346 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -934,7 +934,7 @@ private:
bool PreOrder;
// Unused variable flags
- bool FindUnused;
+ bool WarnUnused;
bool DefaultToUsed;
// stack of list files being read
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index f68ab3ef11..e68f58d4f0 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -141,7 +141,7 @@ cmake::cmake()
{
this->Trace = false;
this->WarnUninitialized = false;
- this->FindUnused = false;
+ this->WarnUnused = false;
this->DefaultToUsed = false;
this->SuppressDevWarnings = false;
this->DoSuppressDevWarnings = false;
@@ -621,16 +621,16 @@ void cmake::SetArgs(const std::vector<std::string>& args)
std::cout << "Warn about uninitialized values.\n";
this->SetWarnUninitialized(true);
}
- else if(arg.find("--find-unused",0) == 0)
+ else if(arg.find("--warn-unused",0) == 0)
{
std::cout << "Finding unused command line variables.\n";
- this->SetFindUnused(true);
+ this->SetWarnUnused(true);
this->SetDefaultToUsed(true);
}
- else if(arg.find("--find-unused-all",0) == 0)
+ else if(arg.find("--warn-unused-all",0) == 0)
{
std::cout << "Finding unused variables.\n";
- this->SetFindUnused(true);
+ this->SetWarnUnused(true);
this->SetDefaultToUsed(false);
}
else if(arg.find("-G",0) == 0)
diff --git a/Source/cmake.h b/Source/cmake.h
index 3a53d481d3..7304d94e1e 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -308,8 +308,8 @@ class cmake
void SetTrace(bool b) { this->Trace = b;}
bool GetWarnUninitialized() { return this->WarnUninitialized;}
void SetWarnUninitialized(bool b) { this->WarnUninitialized = b;}
- bool GetFindUnused() { return this->FindUnused;}
- void SetFindUnused(bool b) { this->FindUnused = b;}
+ bool GetWarnUnused() { return this->WarnUnused;}
+ void SetWarnUnused(bool b) { this->WarnUnused = b;}
bool GetDefaultToUsed() { return this->DefaultToUsed;}
void SetDefaultToUsed(bool b) { this->DefaultToUsed = b;}
// Define a property
@@ -450,7 +450,7 @@ private:
bool DebugOutput;
bool Trace;
bool WarnUninitialized;
- bool FindUnused;
+ bool WarnUnused;
bool DefaultToUsed;
std::string CMakeEditCommand;
std::string CMakeCommand;
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index af922000bb..8d4c3344c3 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -122,9 +122,9 @@ static const char * cmDocumentationOptions[][3] =
"message(send_error ) calls."},
{"--warn-uninitialized", "Warn about uninitialized values.",
"Print a warning when an uninitialized variable is used."},
- {"--find-unused", "Find unused variables.",
+ {"--warn-unused", "Warn about unused variables.",
"Find variables that are declared on the command line, but not used."},
- {"--find-unused-all", "Find all unused variables.",
+ {"--warn-unused-all", "Warn about all unused variables.",
"Find variables that are declared, but not used."},
{"--help-command cmd [file]", "Print help for a single command and exit.",
"Full documentation specific to the given command is displayed. "