Change logic of flag to turn off cli unused checks
Since we default to checking unused cli variables, make the flag turn off the checks.
This commit is contained in:
parent
f047a17c59
commit
b94812072a
|
@ -641,10 +641,10 @@ void cmake::SetArgs(const std::vector<std::string>& args)
|
||||||
std::cout << "Finding unused variables.\n";
|
std::cout << "Finding unused variables.\n";
|
||||||
this->SetWarnUnused(true);
|
this->SetWarnUnused(true);
|
||||||
}
|
}
|
||||||
else if(arg.find("--warn-unused-cli",0) == 0)
|
else if(arg.find("--no-warn-unused-cli",0) == 0)
|
||||||
{
|
{
|
||||||
std::cout << "Finding unused variables given on the command line.\n";
|
std::cout << "Not finding unused variables given on the command line.\n";
|
||||||
this->SetWarnUnusedCli(true);
|
this->SetWarnUnusedCli(false);
|
||||||
}
|
}
|
||||||
else if(arg.find("--check-system-vars",0) == 0)
|
else if(arg.find("--check-system-vars",0) == 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -124,8 +124,8 @@ static const char * cmDocumentationOptions[][3] =
|
||||||
"Print a warning when an uninitialized variable is used."},
|
"Print a warning when an uninitialized variable is used."},
|
||||||
{"--warn-unused-all", "Warn about unused variables.",
|
{"--warn-unused-all", "Warn about unused variables.",
|
||||||
"Find variables that are declared or set, but not used."},
|
"Find variables that are declared or set, but not used."},
|
||||||
{"--warn-unused-cli", "Warn about command line options.",
|
{"--no-warn-unused-cli", "Don't warn about command line options.",
|
||||||
"Find variables that are declared on the command line, but not used."},
|
"Don't find variables that are declared on the command line, but not used."},
|
||||||
{"--help-command cmd [file]", "Print help for a single command and exit.",
|
{"--help-command cmd [file]", "Print help for a single command and exit.",
|
||||||
"Full documentation specific to the given command is displayed. "
|
"Full documentation specific to the given command is displayed. "
|
||||||
"If a file is specified, the documentation is written into and the output "
|
"If a file is specified, the documentation is written into and the output "
|
||||||
|
|
Loading…
Reference in New Issue