STYLE: fix line length

This commit is contained in:
Ken Martin 2006-05-11 15:50:11 -04:00
parent 80f71359c1
commit ba2b99bb9f
17 changed files with 82 additions and 56 deletions

View File

@ -55,7 +55,8 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf)
err += ". Did you mean "; err += ". Did you mean ";
err += name; err += name;
err += "( "; err += "( ";
for(std::vector<cmListFileArgument>::const_iterator a = this->Args.begin(); for(std::vector<cmListFileArgument>::const_iterator a =
this->Args.begin();
a != this->Args.end();++a) a != this->Args.end();++a)
{ {
err += (a->Quoted?"\"":""); err += (a->Quoted?"\"":"");
@ -86,7 +87,8 @@ bool cmIfFunctionBlocker::ShouldRemove(const cmListFileFunction& lff,
void cmIfFunctionBlocker:: void cmIfFunctionBlocker::
ScopeEnded(cmMakefile &mf) ScopeEnded(cmMakefile &mf)
{ {
std::string errmsg = "The end of a CMakeLists file was reached with an IF statement that was not closed properly.\nWithin the directory: "; std::string errmsg = "The end of a CMakeLists file was reached with an "
"IF statement that was not closed properly.\nWithin the directory: ";
errmsg += mf.GetCurrentDirectory(); errmsg += mf.GetCurrentDirectory();
errmsg += "\nThe arguments are: "; errmsg += "\nThe arguments are: ";
for(std::vector<cmListFileArgument>::const_iterator j = this->Args.begin(); for(std::vector<cmListFileArgument>::const_iterator j = this->Args.begin();
@ -100,13 +102,15 @@ ScopeEnded(cmMakefile &mf)
cmSystemTools::Message(errmsg.c_str(), "Warning"); cmSystemTools::Message(errmsg.c_str(), "Warning");
} }
bool cmIfCommand::InvokeInitialPass(const std::vector<cmListFileArgument>& args) bool cmIfCommand
::InvokeInitialPass(const std::vector<cmListFileArgument>& args)
{ {
char* errorString = 0; char* errorString = 0;
std::vector<std::string> expandedArguments; std::vector<std::string> expandedArguments;
this->Makefile->ExpandArguments(args, expandedArguments); this->Makefile->ExpandArguments(args, expandedArguments);
bool isTrue = cmIfCommand::IsTrue(expandedArguments,&errorString,this->Makefile); bool isTrue =
cmIfCommand::IsTrue(expandedArguments,&errorString,this->Makefile);
if (errorString) if (errorString)
{ {

View File

@ -154,9 +154,9 @@ public:
"variable is true or false just if it has been set."; "variable is true or false just if it has been set.";
} }
// this is a shared function for both If and Else to determine if // this is a shared function for both If and Else to determine if the
// the arguments were valid, and if so, was the response true. If there is an // arguments were valid, and if so, was the response true. If there is
// error, the errorString will be set. // an error, the errorString will be set.
static bool IsTrue(const std::vector<std::string> &args, static bool IsTrue(const std::vector<std::string> &args,
char** errorString, const cmMakefile *mf); char** errorString, const cmMakefile *mf);

View File

@ -46,8 +46,9 @@ bool cmIncludeCommand::InitialPass(std::vector<std::string> const& args)
fname = mfile.c_str(); fname = mfile.c_str();
} }
} }
bool readit = this->Makefile->ReadListFile( this->Makefile->GetCurrentListFile(), bool readit =
fname.c_str() ); this->Makefile->ReadListFile( this->Makefile->GetCurrentListFile(),
fname.c_str() );
if(!optional && !readit && !cmSystemTools::GetFatalErrorOccured()) if(!optional && !readit && !cmSystemTools::GetFatalErrorOccured())
{ {
std::string m = "Could not find include file: "; std::string m = "Could not find include file: ";

View File

@ -17,7 +17,8 @@
#include "cmIncludeDirectoryCommand.h" #include "cmIncludeDirectoryCommand.h"
// cmIncludeDirectoryCommand // cmIncludeDirectoryCommand
bool cmIncludeDirectoryCommand::InitialPass(std::vector<std::string> const& args) bool cmIncludeDirectoryCommand
::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 1 ) if(args.size() < 1 )
{ {
@ -43,7 +44,8 @@ bool cmIncludeDirectoryCommand::InitialPass(std::vector<std::string> const& args
{ {
if(i->size() == 0) if(i->size() == 0)
{ {
cmSystemTools::Error("Empty Include Directory Passed into INCLUDE_DIRECTORIES command."); cmSystemTools::Error
("Empty Include Directory Passed into INCLUDE_DIRECTORIES command.");
} }
std::string unixPath = *i; std::string unixPath = *i;
cmSystemTools::ConvertToUnixSlashes(unixPath); cmSystemTools::ConvertToUnixSlashes(unixPath);

View File

@ -17,12 +17,14 @@
#include "cmIncludeExternalMSProjectCommand.h" #include "cmIncludeExternalMSProjectCommand.h"
// cmIncludeExternalMSProjectCommand // cmIncludeExternalMSProjectCommand
bool cmIncludeExternalMSProjectCommand::InitialPass(std::vector<std::string> const& args) bool cmIncludeExternalMSProjectCommand
::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 2) if(args.size() < 2)
{ {
this->SetError("INCLUDE_EXTERNAL_MSPROJECT called with incorrect number of arguments"); this->SetError("INCLUDE_EXTERNAL_MSPROJECT called with incorrect "
return false; "number of arguments");
return false;
} }
// only compile this for win32 to avoid coverage errors // only compile this for win32 to avoid coverage errors
#ifdef _WIN32 #ifdef _WIN32

View File

@ -22,9 +22,9 @@
/** \class cmIncludeExternalMSProjectCommand /** \class cmIncludeExternalMSProjectCommand
* \brief Specify an external MS project file for inclusion in the workspace. * \brief Specify an external MS project file for inclusion in the workspace.
* *
* cmIncludeExternalMSProjectCommand is used to specify an externally generated * cmIncludeExternalMSProjectCommand is used to specify an externally
* Microsoft project file for inclusion in the default workspace generated by * generated Microsoft project file for inclusion in the default workspace
* CMake. * generated by CMake.
*/ */
class cmIncludeExternalMSProjectCommand : public cmCommand class cmIncludeExternalMSProjectCommand : public cmCommand
{ {

View File

@ -17,7 +17,8 @@
#include "cmIncludeRegularExpressionCommand.h" #include "cmIncludeRegularExpressionCommand.h"
// cmIncludeRegularExpressionCommand // cmIncludeRegularExpressionCommand
bool cmIncludeRegularExpressionCommand::InitialPass(std::vector<std::string> const& args) bool cmIncludeRegularExpressionCommand
::InitialPass(std::vector<std::string> const& args)
{ {
if((args.size() < 1) || (args.size() > 2)) if((args.size() < 1) || (args.size() > 2))
{ {

View File

@ -65,7 +65,8 @@ public:
" INCLUDE_REGULAR_EXPRESSION(regex_match [regex_complain])\n" " INCLUDE_REGULAR_EXPRESSION(regex_match [regex_complain])\n"
"Set the regular expressions used in dependency checking. Only files " "Set the regular expressions used in dependency checking. Only files "
"matching regex_match will be traced as dependencies. Only files " "matching regex_match will be traced as dependencies. Only files "
"matching regex_complain will generate warnings if they cannot be found " "matching regex_complain will generate warnings if they cannot be "
"found "
"(standard header paths are not searched). The defaults are:\n" "(standard header paths are not searched). The defaults are:\n"
" regex_match = \"^.*$\" (match everything)\n" " regex_match = \"^.*$\" (match everything)\n"
" regex_complain = \"^$\" (match empty string only)"; " regex_complain = \"^$\" (match empty string only)";

View File

@ -108,13 +108,15 @@ public:
"Executables are always treated as runtime targets. " "Executables are always treated as runtime targets. "
"Static libraries are always treated as archive targets. " "Static libraries are always treated as archive targets. "
"Module libraries are always treated as library targets. " "Module libraries are always treated as library targets. "
"For non-DLL platforms shared libraries are treated as library targets. " "For non-DLL platforms shared libraries are treated as library "
"targets. "
"For DLL platforms the DLL part of a shared library is treated as " "For DLL platforms the DLL part of a shared library is treated as "
"a runtime target and the corresponding import library is treated as " "a runtime target and the corresponding import library is treated as "
"an archive target. " "an archive target. "
"All Windows-based systems including Cygwin are DLL platforms. " "All Windows-based systems including Cygwin are DLL platforms. "
"The ARCHIVE, LIBRARY, and RUNTIME " "The ARCHIVE, LIBRARY, and RUNTIME "
"arguments change the type of target to which the subsequent properties " "arguments change the type of target to which the subsequent "
"properties "
"apply. If none is given the installation properties apply to " "apply. If none is given the installation properties apply to "
"all target types. If only one is given then only targets of that " "all target types. If only one is given then only targets of that "
"type will be installed (which can be used to install just a DLL or " "type will be installed (which can be used to install just a DLL or "
@ -131,12 +133,12 @@ public:
" INSTALL(TARGETS mySharedLib DESTINATION /some/full/path)\n" " INSTALL(TARGETS mySharedLib DESTINATION /some/full/path)\n"
"will install myExe to <prefix>/bin and myStaticLib to " "will install myExe to <prefix>/bin and myStaticLib to "
"<prefix>/lib/static. " "<prefix>/lib/static. "
"On non-DLL platforms mySharedLib will be installed to <prefix>/lib and " "On non-DLL platforms mySharedLib will be installed to <prefix>/lib "
"/some/full/path. On DLL platforms the mySharedLib DLL will be " "and /some/full/path. On DLL platforms the mySharedLib DLL will be "
"installed to <prefix>/bin and /some/full/path and its import library " "installed to <prefix>/bin and /some/full/path and its import library "
"will be installed to <prefix>/lib/static and /some/full/path. " "will be installed to <prefix>/lib/static and /some/full/path. "
"On non-DLL platforms mySharedLib will be installed to <prefix>/lib and " "On non-DLL platforms mySharedLib will be installed to <prefix>/lib "
"/some/full/path." "and /some/full/path."
"\n" "\n"
"The FILES signature:\n" "The FILES signature:\n"
" INSTALL(FILES files... DESTINATION <dir>\n" " INSTALL(FILES files... DESTINATION <dir>\n"
@ -169,7 +171,7 @@ public:
"installation. If the script file name is a relative path " "installation. If the script file name is a relative path "
"it will be interpreted with respect to the current source directory. " "it will be interpreted with respect to the current source directory. "
"The CODE form will invoke the given CMake code during installation. " "The CODE form will invoke the given CMake code during installation. "
"Code is specified as a single argument inside a double-quoted string. " "Code is specified as a single argument inside a double-quoted string. "
"For example, the code\n" "For example, the code\n"
" INSTALL(CODE \"MESSAGE(\\\"Sample install message.\\\")\")\n" " INSTALL(CODE \"MESSAGE(\\\"Sample install message.\\\")\")\n"
"will print a message during installation.\n" "will print a message during installation.\n"

View File

@ -17,7 +17,8 @@
#include "cmInstallFilesCommand.h" #include "cmInstallFilesCommand.h"
// cmExecutableCommand // cmExecutableCommand
bool cmInstallFilesCommand::InitialPass(std::vector<std::string> const& argsIn) bool cmInstallFilesCommand
::InitialPass(std::vector<std::string> const& argsIn)
{ {
if(argsIn.size() < 2) if(argsIn.size() < 2)
{ {

View File

@ -47,18 +47,19 @@ cmInstallGenerator
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void cmInstallGenerator::AddInstallRule( void cmInstallGenerator
std::ostream& os, ::AddInstallRule(
const char* dest, std::ostream& os,
int type, const char* dest,
const char* file, int type,
bool optional /* = false */, const char* file,
const char* properties /* = 0 */, bool optional /* = false */,
const char* permissions /* = 0 */, const char* properties /* = 0 */,
std::vector<std::string> const& configurations /* = std::vector<std::string>() */, const char* permissions /* = 0 */,
const char* component /* = 0 */, std::vector<std::string> const& configurations,
const char* rename /* = 0 */ const char* component /* = 0 */,
) const char* rename /* = 0 */
)
{ {
// Use the FILE command to install the file. // Use the FILE command to install the file.
std::string stype; std::string stype;

View File

@ -39,7 +39,8 @@ public:
const char* file, bool optional = false, const char* file, bool optional = false,
const char* properties = 0, const char* properties = 0,
const char* permissions = 0, const char* permissions = 0,
std::vector<std::string> const& configurations =std::vector<std::string>(), std::vector<std::string> const& configurations
= std::vector<std::string>(),
const char* component = 0, const char* component = 0,
const char* rename = 0 const char* rename = 0
); );

View File

@ -17,7 +17,8 @@
#include "cmInstallProgramsCommand.h" #include "cmInstallProgramsCommand.h"
// cmExecutableCommand // cmExecutableCommand
bool cmInstallProgramsCommand::InitialPass(std::vector<std::string> const& args) bool cmInstallProgramsCommand
::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 2) if(args.size() < 2)
{ {
@ -89,7 +90,8 @@ void cmInstallProgramsCommand::FinalPass()
* present in the build tree. If a full path is given, it is just * present in the build tree. If a full path is given, it is just
* returned. * returned.
*/ */
std::string cmInstallProgramsCommand::FindInstallSource(const char* name) const std::string cmInstallProgramsCommand
::FindInstallSource(const char* name) const
{ {
if(cmSystemTools::FileIsFullPath(name)) if(cmSystemTools::FileIsFullPath(name))
{ {

View File

@ -76,7 +76,7 @@ public:
"using the GLOB form of the FILE command.\n" "using the GLOB form of the FILE command.\n"
" INSTALL_PROGRAMS(<dir> file1 file2 [file3 ...])\n" " INSTALL_PROGRAMS(<dir> file1 file2 [file3 ...])\n"
" INSTALL_PROGRAMS(<dir> FILES file1 [file2 ...])\n" " INSTALL_PROGRAMS(<dir> FILES file1 [file2 ...])\n"
"Create rules to install the listed programs into the given directory. " "Create rules to install the listed programs into the given directory. "
"Use the FILES argument to guarantee that the file list version of " "Use the FILES argument to guarantee that the file list version of "
"the command will be used even when there is only one argument.\n" "the command will be used even when there is only one argument.\n"
" INSTALL_PROGRAMS(<dir> regexp)\n" " INSTALL_PROGRAMS(<dir> regexp)\n"

View File

@ -268,8 +268,9 @@ std::string cmInstallTargetGenerator::GetScriptReference(cmTarget* target,
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void cmInstallTargetGenerator::AddInstallNamePatchRule(std::ostream& os, void cmInstallTargetGenerator
const char* destination) ::AddInstallNamePatchRule(std::ostream& os,
const char* destination)
{ {
// Build a map of build-tree install_name to install-tree install_name for // Build a map of build-tree install_name to install-tree install_name for
// shared libraries linked to this target. // shared libraries linked to this target.
@ -291,13 +292,15 @@ void cmInstallTargetGenerator::AddInstallNamePatchRule(std::ostream& os,
lib != this->Target->GetName()) && lib != this->Target->GetName()) &&
(j->second == cmTarget::GENERAL || j->second == linkType)) (j->second == cmTarget::GENERAL || j->second == linkType))
{ {
if(cmTarget* tgt = this->Target->GetMakefile()->GetLocalGenerator()->GetGlobalGenerator()->FindTarget(0, lib.c_str())) if(cmTarget* tgt = this->Target->GetMakefile()->
GetLocalGenerator()->GetGlobalGenerator()->
FindTarget(0, lib.c_str()))
{ {
if(tgt->GetType() == cmTarget::SHARED_LIBRARY) if(tgt->GetType() == cmTarget::SHARED_LIBRARY)
{ {
// If the build tree and install tree use different path components // If the build tree and install tree use different path
// of the install_name field then we need to create a mapping to be // components of the install_name field then we need to create a
// applied after installation. // mapping to be applied after installation.
std::string for_build = tgt->GetInstallNameDirForBuildTree(config); std::string for_build = tgt->GetInstallNameDirForBuildTree(config);
std::string for_install = std::string for_install =
tgt->GetInstallNameDirForInstallTree(config); tgt->GetInstallNameDirForInstallTree(config);
@ -326,8 +329,10 @@ void cmInstallTargetGenerator::AddInstallNamePatchRule(std::ostream& os,
std::string new_id; std::string new_id;
if(this->Target->GetType() == cmTarget::SHARED_LIBRARY) if(this->Target->GetType() == cmTarget::SHARED_LIBRARY)
{ {
std::string for_build = this->Target->GetInstallNameDirForBuildTree(config); std::string for_build =
std::string for_install = this->Target->GetInstallNameDirForInstallTree(config); this->Target->GetInstallNameDirForBuildTree(config);
std::string for_install =
this->Target->GetInstallNameDirForInstallTree(config);
if(for_build != for_install) if(for_build != for_install)
{ {
// Prepare to refer to the install-tree install_name. // Prepare to refer to the install-tree install_name.
@ -340,8 +345,8 @@ void cmInstallTargetGenerator::AddInstallNamePatchRule(std::ostream& os,
// install_name value and references. // install_name value and references.
if(!new_id.empty() || !install_name_remap.empty()) if(!new_id.empty() || !install_name_remap.empty())
{ {
std::string component_test = std::string component_test = "NOT CMAKE_INSTALL_COMPONENT OR "
"NOT CMAKE_INSTALL_COMPONENT OR \"${CMAKE_INSTALL_COMPONENT}\" MATCHES \"^("; "\"${CMAKE_INSTALL_COMPONENT}\" MATCHES \"^(";
component_test += this->Component; component_test += this->Component;
component_test += ")$\""; component_test += ")$\"";
os << "IF(" << component_test << ")\n"; os << "IF(" << component_test << ")\n";

View File

@ -30,7 +30,8 @@ public:
cmInstallTargetGenerator( cmInstallTargetGenerator(
cmTarget& t, const char* dest, bool implib, cmTarget& t, const char* dest, bool implib,
const char* permissions = "", const char* permissions = "",
std::vector<std::string> const& configurations =std::vector<std::string>(), std::vector<std::string> const& configurations
= std::vector<std::string>(),
const char* component = "" const char* component = ""
); );
virtual ~cmInstallTargetGenerator(); virtual ~cmInstallTargetGenerator();

View File

@ -17,7 +17,8 @@
#include "cmInstallTargetsCommand.h" #include "cmInstallTargetsCommand.h"
// cmExecutableCommand // cmExecutableCommand
bool cmInstallTargetsCommand::InitialPass(std::vector<std::string> const& args) bool cmInstallTargetsCommand
::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() < 2 ) if(args.size() < 2 )
{ {
@ -36,7 +37,8 @@ bool cmInstallTargetsCommand::InitialPass(std::vector<std::string> const& args)
++s; ++s;
if ( s == args.end() ) if ( s == args.end() )
{ {
this->SetError("called with RUNTIME_DIRECTORY but no actual directory"); this->SetError("called with RUNTIME_DIRECTORY but no actual "
"directory");
return false; return false;
} }