STYLE: fix line length

This commit is contained in:
Ken Martin 2006-05-12 13:39:34 -04:00
parent 47c7108111
commit 3c4bfa1003
5 changed files with 48 additions and 31 deletions

View File

@ -22,8 +22,8 @@
/** \class cmObject /** \class cmObject
* \brief Superclass for all commands and other classes in CMake. * \brief Superclass for all commands and other classes in CMake.
* *
* cmObject is the base class for all classes in CMake. It defines some methods * cmObject is the base class for all classes in CMake. It defines some
* such as GetNameOfClass, IsA, SafeDownCast. * methods such as GetNameOfClass, IsA, SafeDownCast.
*/ */
class cmObject class cmObject
{ {

View File

@ -24,9 +24,10 @@ bool cmOptionCommand::InitialPass(std::vector<std::string> const& args)
{ {
argError = true; argError = true;
} }
// for VTK 4.0 we have to support the option command with more than 3 arguments // for VTK 4.0 we have to support the option command with more than 3
// if CMAKE_MINIMUM_REQUIRED_VERSION is not defined, if CMAKE_MINIMUM_REQUIRED_VERSION // arguments if CMAKE_MINIMUM_REQUIRED_VERSION is not defined, if
// is defined, then we can have stricter checking. // CMAKE_MINIMUM_REQUIRED_VERSION is defined, then we can have stricter
// checking.
if(this->Makefile->GetDefinition("CMAKE_MINIMUM_REQUIRED_VERSION")) if(this->Makefile->GetDefinition("CMAKE_MINIMUM_REQUIRED_VERSION"))
{ {
if(args.size() > 3) if(args.size() > 3)

View File

@ -68,13 +68,16 @@ void cmOrderLinkDirectories::FindLibrariesInSearchPaths()
//------------------------------------------------------------------- //-------------------------------------------------------------------
void cmOrderLinkDirectories::FindIndividualLibraryOrders() void cmOrderLinkDirectories::FindIndividualLibraryOrders()
{ {
for(std::vector<Library>::iterator lib = this->MultiDirectoryLibraries.begin(); for(std::vector<Library>::iterator lib =
this->MultiDirectoryLibraries.begin();
lib != this->MultiDirectoryLibraries.end(); ++lib) lib != this->MultiDirectoryLibraries.end(); ++lib)
{ {
std::vector<cmStdString>& dirs = this->LibraryToDirectories[lib->FullPath]; std::vector<cmStdString>& dirs =
std::vector<std::pair<cmStdString, std::vector<cmStdString> > >::iterator i; this->LibraryToDirectories[lib->FullPath];
for(i = this->DirectoryToAfterList.begin(); i != this->DirectoryToAfterList.end(); std::vector<std::pair<cmStdString, std::vector<cmStdString> >
++i) >::iterator i;
for(i = this->DirectoryToAfterList.begin();
i != this->DirectoryToAfterList.end(); ++i)
{ {
if(i->first == lib->Path) if(i->first == lib->Path)
{ {
@ -181,19 +184,20 @@ void cmOrderLinkDirectories::PrepareLinkTargets()
bool cmOrderLinkDirectories::FindPathNotInDirectoryToAfterList( bool cmOrderLinkDirectories::FindPathNotInDirectoryToAfterList(
cmStdString& path) cmStdString& path)
{ {
for(std::vector<std::pair<cmStdString, std::vector<cmStdString> > >::iterator i for(std::vector<std::pair<cmStdString, std::vector<cmStdString> >
= this->DirectoryToAfterList.begin(); >::iterator i = this->DirectoryToAfterList.begin();
i != this->DirectoryToAfterList.end(); ++i) i != this->DirectoryToAfterList.end(); ++i)
{ {
const cmStdString& p = i->first; const cmStdString& p = i->first;
bool found = false; bool found = false;
for(std::vector<std::pair<cmStdString, std::vector<cmStdString> > >::iterator j for(std::vector<std::pair<cmStdString, std::vector<cmStdString> >
= this->DirectoryToAfterList.begin(); j != this->DirectoryToAfterList.end() >::iterator j = this->DirectoryToAfterList.begin();
&& !found; ++j) j != this->DirectoryToAfterList.end() && !found; ++j)
{ {
if(j != i) if(j != i)
{ {
found = (std::find(j->second.begin(), j->second.end(), p) != j->second.end()); found = (std::find(j->second.begin(), j->second.end(), p)
!= j->second.end());
} }
} }
if(!found) if(!found)
@ -226,8 +230,8 @@ void cmOrderLinkDirectories::OrderPaths(std::vector<cmStdString>&
// then there is a cycle and we are stuck // then there is a cycle and we are stuck
if(this->DirectoryToAfterList.size()) if(this->DirectoryToAfterList.size())
{ {
for(std::vector<std::pair<cmStdString, std::vector<cmStdString> > >::iterator i for(std::vector<std::pair<cmStdString, std::vector<cmStdString> >
= this->DirectoryToAfterList.begin(); >::iterator i = this->DirectoryToAfterList.begin();
i != this->DirectoryToAfterList.end(); ++i) i != this->DirectoryToAfterList.end(); ++i)
{ {
this->ImpossibleDirectories.insert(i->first); this->ImpossibleDirectories.insert(i->first);
@ -337,11 +341,13 @@ bool cmOrderLinkDirectories::DetermineLibraryPathOrder()
} }
else else
{ {
std::string message = "Warning: Ignoring path found in link libraries for target: "; std::string message =
"Warning: Ignoring path found in link libraries for target: ";
message += this->TargetName; message += this->TargetName;
message += ", path is: "; message += ", path is: ";
message += this->RawLinkItems[i]; message += this->RawLinkItems[i];
message += ". Expected a library name or a full path to a library name."; message +=
". Expected a library name or a full path to a library name.";
cmSystemTools::Message(message.c_str()); cmSystemTools::Message(message.c_str());
continue; continue;
} }
@ -382,16 +388,19 @@ bool cmOrderLinkDirectories::DetermineLibraryPathOrder()
} }
this->FindLibrariesInSearchPaths(); this->FindLibrariesInSearchPaths();
for(std::map<cmStdString, std::vector<cmStdString> >::iterator lib = for(std::map<cmStdString, std::vector<cmStdString> >::iterator lib =
this->LibraryToDirectories.begin(); lib!= this->LibraryToDirectories.end(); this->LibraryToDirectories.begin();
lib!= this->LibraryToDirectories.end();
++lib) ++lib)
{ {
if(lib->second.size() > 0) if(lib->second.size() > 0)
{ {
this->MultiDirectoryLibraries.push_back(this->FullPathLibraries[lib->first]); this->MultiDirectoryLibraries.push_back
(this->FullPathLibraries[lib->first]);
} }
else else
{ {
this->SingleDirectoryLibraries.push_back(this->FullPathLibraries[lib->first]); this->SingleDirectoryLibraries.push_back
(this->FullPathLibraries[lib->first]);
} }
} }
this->FindIndividualLibraryOrders(); this->FindIndividualLibraryOrders();
@ -399,7 +408,8 @@ bool cmOrderLinkDirectories::DetermineLibraryPathOrder()
if(this->Debug) if(this->Debug)
{ {
this->PrintMap("this->LibraryToDirectories", this->LibraryToDirectories); this->PrintMap("this->LibraryToDirectories", this->LibraryToDirectories);
this->PrintVector("this->DirectoryToAfterList", this->DirectoryToAfterList); this->PrintVector("this->DirectoryToAfterList",
this->DirectoryToAfterList);
} }
this->OrderPaths(this->SortedSearchPaths); this->OrderPaths(this->SortedSearchPaths);
// now turn libfoo.a into foo and foo.a into foo // now turn libfoo.a into foo and foo.a into foo
@ -415,7 +425,11 @@ bool cmOrderLinkDirectories::DetermineLibraryPathOrder()
std::string cmOrderLinkDirectories::GetWarnings() std::string cmOrderLinkDirectories::GetWarnings()
{ {
std::string warning = "It is impossible to order the linker search path in such a way that libraries specified as full paths will be picked by the linker.\nDirectories and libraries involved are:\n"; std::string warning =
"It is impossible to order the linker search path in such a way "
"that libraries specified as full paths will be picked by the "
"linker.\nDirectories and libraries involved are:\n";
for(std::set<cmStdString>::iterator i = this->ImpossibleDirectories.begin(); for(std::set<cmStdString>::iterator i = this->ImpossibleDirectories.begin();
i != this->ImpossibleDirectories.end(); ++i) i != this->ImpossibleDirectories.end(); ++i)
{ {
@ -466,9 +480,8 @@ cmOrderLinkDirectories::PrintVector(const char* name,
std::vector<cmStdString> > >& m) std::vector<cmStdString> > >& m)
{ {
std::cout << name << "\n"; std::cout << name << "\n";
for(std::vector<std::pair<cmStdString, std::vector<cmStdString> > >::iterator i = for(std::vector<std::pair<cmStdString, std::vector<cmStdString> >
m.begin(); i != m.end(); >::iterator i = m.begin(); i != m.end(); ++i)
++i)
{ {
std::cout << i->first << ": "; std::cout << i->first << ": ";
for(std::vector<cmStdString>::iterator l = i->second.begin(); for(std::vector<cmStdString>::iterator l = i->second.begin();
@ -483,7 +496,8 @@ cmOrderLinkDirectories::PrintVector(const char* name,
void cmOrderLinkDirectories::GetFullPathLibraries(std::vector<cmStdString>& void cmOrderLinkDirectories::GetFullPathLibraries(std::vector<cmStdString>&
libs) libs)
{ {
for(std::map<cmStdString, Library>::iterator i = this->FullPathLibraries.begin(); for(std::map<cmStdString, Library>::iterator i =
this->FullPathLibraries.begin();
i != this->FullPathLibraries.end(); ++i) i != this->FullPathLibraries.end(); ++i)
{ {
libs.push_back(i->first); libs.push_back(i->first);

View File

@ -125,7 +125,8 @@ private:
// map from library to directories that it is in other than its full path // map from library to directories that it is in other than its full path
std::map<cmStdString, std::vector<cmStdString> > LibraryToDirectories; std::map<cmStdString, std::vector<cmStdString> > LibraryToDirectories;
// map from directory to vector of directories that must be after it // map from directory to vector of directories that must be after it
std::vector<std::pair<cmStdString, std::vector<cmStdString> > > DirectoryToAfterList; std::vector<std::pair<cmStdString, std::vector<cmStdString> > >
DirectoryToAfterList;
std::set<cmStdString> DirectoryToAfterListEmitted; std::set<cmStdString> DirectoryToAfterListEmitted;
// map from full path to a Library struct // map from full path to a Library struct
std::map<cmStdString, Library> FullPathLibraries; std::map<cmStdString, Library> FullPathLibraries;

View File

@ -176,7 +176,8 @@ void cmLBDepend::DependWalk(cmDependInformation* info)
} }
// cmOutputRequiredFilesCommand // cmOutputRequiredFilesCommand
bool cmOutputRequiredFilesCommand::InitialPass(std::vector<std::string> const& args) bool cmOutputRequiredFilesCommand
::InitialPass(std::vector<std::string> const& args)
{ {
if(args.size() != 2 ) if(args.size() != 2 )
{ {