diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2010-09-16 15:49:58 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2010-09-16 15:49:58 (GMT) |
commit | f117423336a91f4f50f031d0acc892d4c10316c3 (patch) | |
tree | c9a9c684da2b79afc7667ffe9922f44db09551bf /Source | |
parent | e49a935c20550482e9f92ceb05d1f2a0bc519c91 (diff) | |
download | CMake-f117423336a91f4f50f031d0acc892d4c10316c3.zip CMake-f117423336a91f4f50f031d0acc892d4c10316c3.tar.gz CMake-f117423336a91f4f50f031d0acc892d4c10316c3.tar.bz2 |
Fix line lengths to be no more than 78
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmCommandArgumentParserHelper.cxx | 6 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 18 | ||||
-rw-r--r-- | Source/cmake.cxx | 6 | ||||
-rw-r--r-- | Source/cmakemain.cxx | 10 |
4 files changed, 26 insertions, 14 deletions
diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index 8b009e0..3f1ba53 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/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 << ":" << diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 9d5c59e..592e05e 100644 --- a/Source/cmMakefile.cxx +++ b/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 << ":" << diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 757ad6f..007f52d 100644 --- a/Source/cmake.cxx +++ b/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) diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index aa455a0..a51673c 100644 --- a/Source/cmakemain.cxx +++ b/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 " |