1
0
Эх сурвалжийг харах

Fix line lengths to be no more than 78

Ben Boeckel 15 жил өмнө
parent
commit
f117423336

+ 4 - 2
Source/cmCommandArgumentParserHelper.cxx

@@ -131,8 +131,10 @@ char* cmCommandArgumentParserHelper::ExpandVariable(const char* var)
     if(this->WarnUninitialized && !this->Makefile->VariableInitialized(var))
       {
       if (this->CheckSystemVars ||
-          cmSystemTools::IsSubDirectory(this->FileName, this->Makefile->GetHomeDirectory()) ||
-          cmSystemTools::IsSubDirectory(this->FileName, this->Makefile->GetHomeOutputDirectory()))
+          cmSystemTools::IsSubDirectory(this->FileName,
+                                        this->Makefile->GetHomeDirectory()) ||
+          cmSystemTools::IsSubDirectory(this->FileName,
+                                        this->Makefile->GetHomeOutputDirectory()))
         {
         cmOStringStream msg;
         msg << this->FileName << ":" << this->FileLine << ":" <<

+ 12 - 6
Source/cmMakefile.cxx

@@ -1649,7 +1649,8 @@ void cmMakefile::AddDefinition(const char* name, const char* value)
 #endif
 
   this->Internal->VarStack.top().Set(name, value);
-  if ((this->Internal->VarUsageStack.size() > 1) && this->VariableInitialized(name))
+  if ((this->Internal->VarUsageStack.size() > 1) &&
+      this->VariableInitialized(name))
     {
     this->CheckForUnused("changing definition", name);
     this->Internal->VarUsageStack.top().erase(name);
@@ -1719,7 +1720,8 @@ void cmMakefile::AddCacheDefinition(const char* name, const char* value,
 void cmMakefile::AddDefinition(const char* name, bool value)
 {
   this->Internal->VarStack.top().Set(name, value? "ON" : "OFF");
-  if ((this->Internal->VarUsageStack.size() > 1) && this->VariableInitialized(name))
+  if ((this->Internal->VarUsageStack.size() > 1) &&
+      this->VariableInitialized(name))
     {
     this->CheckForUnused("changing definition", name);
     this->Internal->VarUsageStack.top().erase(name);
@@ -1742,7 +1744,8 @@ void cmMakefile::MarkVariableAsUsed(const char* var)
 
 bool cmMakefile::VariableInitialized(const char* var) const
 {
-  if(this->Internal->VarInitStack.top().find(var) != this->Internal->VarInitStack.top().end())
+  if(this->Internal->VarInitStack.top().find(var) !=
+      this->Internal->VarInitStack.top().end())
     {
     return true;
     }
@@ -1751,7 +1754,8 @@ bool cmMakefile::VariableInitialized(const char* var) const
 
 bool cmMakefile::VariableUsed(const char* var) const
 {
-  if(this->Internal->VarUsageStack.top().find(var) != this->Internal->VarUsageStack.top().end())
+  if(this->Internal->VarUsageStack.top().find(var) !=
+      this->Internal->VarUsageStack.top().end())
     {
     return true;
     }
@@ -1773,8 +1777,10 @@ bool cmMakefile::CheckForUnused(const char* reason, const char* name)
     {
     const cmListFileContext* file = this->CallStack.back().Context;
     if (this->CheckSystemVars ||
-        cmSystemTools::IsSubDirectory(file->FilePath.c_str(), this->GetHomeDirectory()) ||
-        cmSystemTools::IsSubDirectory(file->FilePath.c_str(), this->GetHomeOutputDirectory()))
+        cmSystemTools::IsSubDirectory(file->FilePath.c_str(),
+                                      this->GetHomeDirectory()) ||
+        cmSystemTools::IsSubDirectory(file->FilePath.c_str(),
+                                      this->GetHomeOutputDirectory()))
       {
       cmOStringStream msg;
       msg << file->FilePath << ":" << file->Line << ":" <<

+ 4 - 2
Source/cmake.cxx

@@ -643,12 +643,14 @@ void cmake::SetArgs(const std::vector<std::string>& args)
       }
     else if(arg.find("--no-warn-unused-cli",0) == 0)
       {
-      std::cout << "Not finding unused variables given on the command line.\n";
+      std::cout << "Not searching for unused variables given on the " <<
+                   "command line.\n";
       this->SetWarnUnusedCli(false);
       }
     else if(arg.find("--check-system-vars",0) == 0)
       {
-      std::cout << "Also check system files when warning about unused and uninitialized variables.\n";
+      std::cout << "Also check system files when warning about unused and " <<
+                   "uninitialized variables.\n";
       this->SetCheckSystemVars(true);
       }
     else if(arg.find("-G",0) == 0)

+ 6 - 4
Source/cmakemain.cxx

@@ -125,10 +125,12 @@ static const char * cmDocumentationOptions[][3] =
   {"--warn-unused-vars", "Warn about unused variables.",
    "Find variables that are declared or set, but not used."},
   {"--no-warn-unused-cli", "Don't warn about command line options.",
-   "Don't find variables that are declared on the command line, but not used."},
-  {"--check-system-vars", "Find problems with variable usage in system files.",
-   "Normally, unused and uninitialized variables are searched for only in CMAKE_SOURCE_DIR "
-   "and CMAKE_BINARY_DIR. This flag tells CMake to warn about other files as well."},
+   "Don't find variables that are declared on the command line, but not "
+   "used."},
+  {"--check-system-vars", "Find problems with variable usage in system "
+   "files.", "Normally, unused and uninitialized variables are searched for "
+   "only in CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR. This flag tells CMake to "
+   "warn about other files as well."},
   {"--help-command cmd [file]", "Print help for a single command and exit.",
    "Full documentation specific to the given command is displayed. "
    "If a file is specified, the documentation is written into and the output "