summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2010-08-25 16:36:21 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2010-09-01 17:08:14 (GMT)
commit4ff03402fc137bf5624d4a71c1ad3b177e5ceb53 (patch)
tree30fc83fbf66af3220e2b13301cea6390a11d4c50
parentd7999e9b294f93f68b5ec9e3efd8017fad3f05d9 (diff)
downloadCMake-4ff03402fc137bf5624d4a71c1ad3b177e5ceb53.zip
CMake-4ff03402fc137bf5624d4a71c1ad3b177e5ceb53.tar.gz
CMake-4ff03402fc137bf5624d4a71c1ad3b177e5ceb53.tar.bz2
Rename find-unused to warn-unused
-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 e4973cb..214c8be 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 184253a..7141747 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 f68ab3e..e68f58d 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 3a53d48..7304d94 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 af92200..8d4c334 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. "