STYLE: fix line length

This commit is contained in:
Ken Martin 2006-05-12 14:36:39 -04:00
parent cac30b5ff8
commit bf5ed9b27b
8 changed files with 71 additions and 50 deletions

View File

@ -66,7 +66,8 @@ void cmXCode21Object::PrintList(std::vector<cmXCodeObject*> const& v,
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXBuildStyle); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXBuildStyle);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXContainerItemProxy); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXContainerItemProxy);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXFileReference); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXFileReference);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXFrameworksBuildPhase); cmXCode21Object::PrintList(v, out,
cmXCode21Object::PBXFrameworksBuildPhase);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXGroup); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXGroup);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXHeadersBuildPhase); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXHeadersBuildPhase);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXNativeTarget); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXNativeTarget);
@ -76,7 +77,8 @@ void cmXCode21Object::PrintList(std::vector<cmXCodeObject*> const& v,
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXResourcesBuildPhase); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXResourcesBuildPhase);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXSourcesBuildPhase); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXSourcesBuildPhase);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXCopyFilesBuildPhase); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXCopyFilesBuildPhase);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXApplicationReference); cmXCode21Object::PrintList(v, out,
cmXCode21Object::PBXApplicationReference);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PrintList(v, out,
cmXCode21Object::PBXExecutableFileReference); cmXCode21Object::PBXExecutableFileReference);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXLibraryReference); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXLibraryReference);

View File

@ -8,8 +8,10 @@ class cmXCode21Object : public cmXCodeObject
public: public:
cmXCode21Object(PBXType ptype, Type type); cmXCode21Object(PBXType ptype, Type type);
virtual void PrintComment(std::ostream&); virtual void PrintComment(std::ostream&);
static void PrintList(std::vector<cmXCodeObject*> const&, std::ostream& out, static void PrintList(std::vector<cmXCodeObject*> const&,
std::ostream& out,
PBXType t); PBXType t);
static void PrintList(std::vector<cmXCodeObject*> const&, std::ostream& out); static void PrintList(std::vector<cmXCodeObject*> const&,
std::ostream& out);
}; };
#endif #endif

View File

@ -39,7 +39,8 @@ cmXCodeObject::cmXCodeObject(PBXType ptype, Type type)
} }
else else
{ {
this->Id = "Temporary cmake object, should not be refered to in xcode file"; this->Id =
"Temporary cmake object, should not be refered to in xcode file";
} }
cmSystemTools::ReplaceString(this->Id, "0x", ""); cmSystemTools::ReplaceString(this->Id, "0x", "");
this->Id = cmSystemTools::UpperCase(this->Id); this->Id = cmSystemTools::UpperCase(this->Id);
@ -73,7 +74,8 @@ void cmXCodeObject::Print(std::ostream& out)
{ {
std::string separator = "\n"; std::string separator = "\n";
int indentFactor = 1; int indentFactor = 1;
if(this->Version > 15 && (this->IsA == PBXFileReference || this->IsA == PBXBuildFile)) if(this->Version > 15
&& (this->IsA == PBXFileReference || this->IsA == PBXBuildFile))
{ {
separator = " "; separator = " ";
indentFactor = 0; indentFactor = 0;
@ -92,7 +94,8 @@ void cmXCodeObject::Print(std::ostream& out)
std::map<cmStdString, cmXCodeObject*>::iterator i; std::map<cmStdString, cmXCodeObject*>::iterator i;
cmXCodeObject::Indent(3*indentFactor, out); cmXCodeObject::Indent(3*indentFactor, out);
out << "isa = " << PBXTypeNames[this->IsA] << ";" << separator; out << "isa = " << PBXTypeNames[this->IsA] << ";" << separator;
for(i = this->ObjectAttributes.begin(); i != this->ObjectAttributes.end(); ++i) for(i = this->ObjectAttributes.begin();
i != this->ObjectAttributes.end(); ++i)
{ {
cmXCodeObject* object = i->second; cmXCodeObject* object = i->second;
if(i->first != "isa") if(i->first != "isa")

View File

@ -49,22 +49,25 @@ public:
{ {
this->List.push_back(value); this->List.push_back(value);
} }
bool HasObject(cmXCodeObject* o) bool HasObject(cmXCodeObject* o)
{ {
return !(std::find(this->List.begin(), this->List.end(), o) == this->List.end()); return !(std::find(this->List.begin(), this->List.end(), o)
} == this->List.end());
}
void AddUniqueObject(cmXCodeObject* value) void AddUniqueObject(cmXCodeObject* value)
{ {
if(std::find(this->List.begin(), this->List.end(), value) == this->List.end()) if(std::find(this->List.begin(), this->List.end(), value)
{ == this->List.end())
this->List.push_back(value); {
} this->List.push_back(value);
} }
}
static void Indent(int level, std::ostream& out); static void Indent(int level, std::ostream& out);
void Print(std::ostream& out); void Print(std::ostream& out);
virtual void PrintComment(std::ostream&) {}; virtual void PrintComment(std::ostream&) {};
static void PrintList(std::vector<cmXCodeObject*> const&, std::ostream& out); static void PrintList(std::vector<cmXCodeObject*> const&,
std::ostream& out);
const char* GetId() const char* GetId()
{ {
return this->Id.c_str(); return this->Id.c_str();

View File

@ -44,18 +44,20 @@ public:
virtual int ParseFile(const char* file); virtual int ParseFile(const char* file);
/** /**
* When parsing fragments of XML or streaming XML, use the following three * When parsing fragments of XML or streaming XML, use the following
* methods. InitializeParser method initialize parser but does not perform * three methods. InitializeParser method initialize parser but does
* any actual parsing. ParseChunk parses framgent of XML. This has to match * not perform any actual parsing. ParseChunk parses framgent of
* to what was already parsed. CleanupParser finishes parsing. If there were * XML. This has to match to what was already parsed. CleanupParser
* errors, CleanupParser will report them. * finishes parsing. If there were errors, CleanupParser will report
* them.
*/ */
virtual int InitializeParser(); virtual int InitializeParser();
virtual int ParseChunk(const char* inputString, unsigned int length); virtual int ParseChunk(const char* inputString, unsigned int length);
virtual int CleanupParser(); virtual int CleanupParser();
protected: protected:
//! This variable is true if there was a parse error while parsing in chunks. //! This variable is true if there was a parse error while parsing in
//chunks.
int ParseError; int ParseError;
//1 Expat parser structure. Exists only during call to Parse(). //1 Expat parser structure. Exists only during call to Parse().
@ -71,16 +73,15 @@ protected:
virtual int ParsingComplete(); virtual int ParsingComplete();
/** /**
* Called when a new element is opened in the XML source. Should be replaced * Called when a new element is opened in the XML source. Should be
* by subclasses to handle each element. * replaced by subclasses to handle each element. name = Name of new
* name = Name of new element. * element. atts = Null-terminated array of attribute name/value pairs.
* atts = Null-terminated array of attribute name/value pairs. Even * Even indices are attribute names, and odd indices are values.
* indices are attribute names, and odd indices are values.
*/ */
virtual void StartElement(const char* name, const char** atts); virtual void StartElement(const char* name, const char** atts);
//! Called at the end of an element in the XML source opened when StartElement //! Called at the end of an element in the XML source opened when
// was called. //StartElement was called.
virtual void EndElement(const char* name); virtual void EndElement(const char* name);
//! Called when there is character data to handle. //! Called when there is character data to handle.

View File

@ -1163,10 +1163,12 @@ void cmake::SetGlobalGenerator(cmGlobalGenerator *gg)
// set the new // set the new
this->GlobalGenerator = gg; this->GlobalGenerator = gg;
// set the global flag for unix style paths on cmSystemTools as
// soon as the generator is set. This allows gmake to be used // set the global flag for unix style paths on cmSystemTools as soon as
// on windows. // the generator is set. This allows gmake to be used on windows.
cmSystemTools::SetForceUnixPaths(this->GlobalGenerator->GetForceUnixPaths()); cmSystemTools::SetForceUnixPaths
(this->GlobalGenerator->GetForceUnixPaths());
// Save the environment variables CXX and CC // Save the environment variables CXX and CC
const char* cxx = getenv("CXX"); const char* cxx = getenv("CXX");
const char* cc = getenv("CC"); const char* cc = getenv("CC");
@ -1287,7 +1289,8 @@ int cmake::Configure()
// no generator specified on the command line // no generator specified on the command line
if(!this->GlobalGenerator) if(!this->GlobalGenerator)
{ {
const char* genName = this->CacheManager->GetCacheValue("CMAKE_GENERATOR"); const char* genName =
this->CacheManager->GetCacheValue("CMAKE_GENERATOR");
if(genName) if(genName)
{ {
this->GlobalGenerator = this->CreateGlobalGenerator(genName); this->GlobalGenerator = this->CreateGlobalGenerator(genName);
@ -2023,14 +2026,16 @@ const char* cmake::GetCTestCommand()
#ifdef CMAKE_BUILD_WITH_CMAKE #ifdef CMAKE_BUILD_WITH_CMAKE
this->CTestCommand = mf->GetRequiredDefinition("CMAKE_COMMAND"); this->CTestCommand = mf->GetRequiredDefinition("CMAKE_COMMAND");
this->CTestCommand = removeQuotes(this->CTestCommand); this->CTestCommand = removeQuotes(this->CTestCommand);
this->CTestCommand = cmSystemTools::GetFilenamePath(this->CTestCommand.c_str()); this->CTestCommand =
cmSystemTools::GetFilenamePath(this->CTestCommand.c_str());
this->CTestCommand += "/"; this->CTestCommand += "/";
this->CTestCommand += "ctest"; this->CTestCommand += "ctest";
this->CTestCommand += cmSystemTools::GetExecutableExtension(); this->CTestCommand += cmSystemTools::GetExecutableExtension();
if(!cmSystemTools::FileExists(this->CTestCommand.c_str())) if(!cmSystemTools::FileExists(this->CTestCommand.c_str()))
{ {
this->CTestCommand = mf->GetRequiredDefinition("CMAKE_COMMAND"); this->CTestCommand = mf->GetRequiredDefinition("CMAKE_COMMAND");
this->CTestCommand = cmSystemTools::GetFilenamePath(this->CTestCommand.c_str()); this->CTestCommand =
cmSystemTools::GetFilenamePath(this->CTestCommand.c_str());
this->CTestCommand += "/Debug/"; this->CTestCommand += "/Debug/";
this->CTestCommand += "ctest"; this->CTestCommand += "ctest";
this->CTestCommand += cmSystemTools::GetExecutableExtension(); this->CTestCommand += cmSystemTools::GetExecutableExtension();
@ -2038,7 +2043,8 @@ const char* cmake::GetCTestCommand()
if(!cmSystemTools::FileExists(this->CTestCommand.c_str())) if(!cmSystemTools::FileExists(this->CTestCommand.c_str()))
{ {
this->CTestCommand = mf->GetRequiredDefinition("CMAKE_COMMAND"); this->CTestCommand = mf->GetRequiredDefinition("CMAKE_COMMAND");
this->CTestCommand = cmSystemTools::GetFilenamePath(this->CTestCommand.c_str()); this->CTestCommand =
cmSystemTools::GetFilenamePath(this->CTestCommand.c_str());
this->CTestCommand += "/Release/"; this->CTestCommand += "/Release/";
this->CTestCommand += "ctest"; this->CTestCommand += "ctest";
this->CTestCommand += cmSystemTools::GetExecutableExtension(); this->CTestCommand += cmSystemTools::GetExecutableExtension();
@ -2070,14 +2076,16 @@ const char* cmake::GetCPackCommand()
#ifdef CMAKE_BUILD_WITH_CMAKE #ifdef CMAKE_BUILD_WITH_CMAKE
this->CPackCommand = mf->GetRequiredDefinition("CMAKE_COMMAND"); this->CPackCommand = mf->GetRequiredDefinition("CMAKE_COMMAND");
this->CPackCommand = removeQuotes(this->CPackCommand); this->CPackCommand = removeQuotes(this->CPackCommand);
this->CPackCommand = cmSystemTools::GetFilenamePath(this->CPackCommand.c_str()); this->CPackCommand =
cmSystemTools::GetFilenamePath(this->CPackCommand.c_str());
this->CPackCommand += "/"; this->CPackCommand += "/";
this->CPackCommand += "cpack"; this->CPackCommand += "cpack";
this->CPackCommand += cmSystemTools::GetExecutableExtension(); this->CPackCommand += cmSystemTools::GetExecutableExtension();
if(!cmSystemTools::FileExists(this->CPackCommand.c_str())) if(!cmSystemTools::FileExists(this->CPackCommand.c_str()))
{ {
this->CPackCommand = mf->GetRequiredDefinition("CMAKE_COMMAND"); this->CPackCommand = mf->GetRequiredDefinition("CMAKE_COMMAND");
this->CPackCommand = cmSystemTools::GetFilenamePath(this->CPackCommand.c_str()); this->CPackCommand =
cmSystemTools::GetFilenamePath(this->CPackCommand.c_str());
this->CPackCommand += "/Debug/"; this->CPackCommand += "/Debug/";
this->CPackCommand += "cpack"; this->CPackCommand += "cpack";
this->CPackCommand += cmSystemTools::GetExecutableExtension(); this->CPackCommand += cmSystemTools::GetExecutableExtension();
@ -2085,7 +2093,8 @@ const char* cmake::GetCPackCommand()
if(!cmSystemTools::FileExists(this->CPackCommand.c_str())) if(!cmSystemTools::FileExists(this->CPackCommand.c_str()))
{ {
this->CPackCommand = mf->GetRequiredDefinition("CMAKE_COMMAND"); this->CPackCommand = mf->GetRequiredDefinition("CMAKE_COMMAND");
this->CPackCommand = cmSystemTools::GetFilenamePath(this->CPackCommand.c_str()); this->CPackCommand =
cmSystemTools::GetFilenamePath(this->CPackCommand.c_str());
this->CPackCommand += "/Release/"; this->CPackCommand += "/Release/";
this->CPackCommand += "cpack"; this->CPackCommand += "cpack";
this->CPackCommand += cmSystemTools::GetExecutableExtension(); this->CPackCommand += cmSystemTools::GetExecutableExtension();
@ -2201,8 +2210,6 @@ void cmake::GenerateGraphViz(const char* fileName)
sprintf(tgtName, "%s%d", graphNodePrefix, cnt++); sprintf(tgtName, "%s%d", graphNodePrefix, cnt++);
targetNamesNodes[realTargetName] = tgtName; targetNamesNodes[realTargetName] = tgtName;
targetPtrs[realTargetName] = &tit->second; targetPtrs[realTargetName] = &tit->second;
//str << " \"" << tgtName << "\" [ label=\"" << tit->first.c_str()
//<< "\" shape=\"box\"];" << std::endl;
} }
} }
// Ok, now find all the stuff we link to that is not in cmake // Ok, now find all the stuff we link to that is not in cmake

View File

@ -243,9 +243,9 @@ class cmake
int DoPreConfigureChecks(); int DoPreConfigureChecks();
/** /**
* Set and get the script mode option. In script mode there is no generator * Set and get the script mode option. In script mode there is no
* and no cache. Also, language are not enabled, so add_executable and things * generator and no cache. Also, language are not enabled, so
* do not do anything. * add_executable and things do not do anything.
*/ */
void SetScriptMode(bool mode) { this->ScriptMode = mode; } void SetScriptMode(bool mode) { this->ScriptMode = mode; }
bool GetScriptMode() { return this->ScriptMode; } bool GetScriptMode() { return this->ScriptMode; }
@ -311,7 +311,8 @@ protected:
void SetDirectoriesFromFile(const char* arg); void SetDirectoriesFromFile(const char* arg);
//! Make sure all commands are what they say they are and there is no macros. //! Make sure all commands are what they say they are and there is no
//macros.
void CleanupCommandsAndMacros(); void CleanupCommandsAndMacros();
void GenerateGraphViz(const char* fileName); void GenerateGraphViz(const char* fileName);
@ -366,7 +367,8 @@ private:
{0, \ {0, \
"CMake is a cross-platform build system generator. Projects " \ "CMake is a cross-platform build system generator. Projects " \
"specify their build process with platform-independent CMake listfiles " \ "specify their build process with platform-independent CMake listfiles " \
"included in each directory of a source tree with the name CMakeLists.txt. "\ "included in each directory of a source tree with the name " \
"CMakeLists.txt. " \
"Users build a project by using CMake to generate a build system " \ "Users build a project by using CMake to generate a build system " \
"for a native tool on their platform.", 0} "for a native tool on their platform.", 0}
#endif #endif

View File

@ -45,7 +45,8 @@ static const cmDocumentationEntry cmDocumentationDescription[] =
{ {
{0, {0,
"The \"cmake\" executable is the CMake command-line interface. It may " "The \"cmake\" executable is the CMake command-line interface. It may "
"be used to configure projects in scripts. Project configuration settings " "be used to configure projects in scripts. Project configuration "
"settings "
"may be specified on the command line with the -D option. The -i option " "may be specified on the command line with the -D option. The -i option "
"will cause cmake to interactively prompt for such settings.", 0}, "will cause cmake to interactively prompt for such settings.", 0},
CMAKE_STANDARD_INTRODUCTION, CMAKE_STANDARD_INTRODUCTION,