ENH: change set<string> to set<cmStdString> to avoid long symbols that crash ar on solaris

This commit is contained in:
Bill Hoffman 2002-05-09 09:33:52 -04:00
parent 1de2e69810
commit 6734d3bb88
5 changed files with 20 additions and 20 deletions

View File

@ -249,7 +249,7 @@ void cmDSWWriter::WriteProject(std::ostream& fout,
}
}
std::set<std::string>::const_iterator i, end;
std::set<cmStdString>::const_iterator i, end;
// write utility dependencies.
i = target.GetUtilities().begin();
end = target.GetUtilities().end();

View File

@ -398,7 +398,7 @@ void cmMSDotNETGenerator::WriteProjectDepends(std::ostream& fout,
}
}
std::set<std::string>::const_iterator i, end;
std::set<cmStdString>::const_iterator i, end;
// write utility dependencies.
i = target.GetUtilities().begin();
end = target.GetUtilities().end();

View File

@ -232,7 +232,7 @@ cmTarget::AnalyzeLibDependencies( const cmMakefile& mf )
// missing. Start from the back and keep adding.
LinkLibraries newLinkLibraries = m_LinkLibraries;
std::set<std::string> done, visited;
std::set<cmStdString> done, visited;
for(LinkLibraries::reverse_iterator lib = m_LinkLibraries.rbegin();
lib != m_LinkLibraries.rend(); ++lib)
{
@ -297,8 +297,8 @@ cmTarget::AnalyzeLibDependencies( const cmMakefile& mf )
void cmTarget::Emit( const std::string& lib,
const DependencyMap& dep_map,
std::set<std::string>& emitted,
std::set<std::string>& visited,
std::set<cmStdString>& emitted,
std::set<cmStdString>& visited,
std::vector<std::string>& link_line ) const
{
// It's already been emitted
@ -317,8 +317,8 @@ void cmTarget::Emit( const std::string& lib,
{
if( dep_map.find(lib) != dep_map.end() ) // does it have dependencies?
{
const std::set<std::string>& dep_on = dep_map.find( lib )->second;
std::set<std::string>::const_iterator i;
const std::set<cmStdString>& dep_on = dep_map.find( lib )->second;
std::set<cmStdString>::const_iterator i;
for( i = dep_on.begin(); i != dep_on.end(); ++i )
{
Emit( *i, dep_map, emitted, visited, link_line );
@ -373,7 +373,7 @@ void cmTarget::GatherDependencies( const cmMakefile& mf,
bool cmTarget::DependsOn( const std::string& lib1, const std::string& lib2,
const DependencyMap& dep_map,
std::set<std::string>& visited ) const
std::set<cmStdString>& visited ) const
{
if( !visited.insert( lib1 ).second )
{
@ -391,7 +391,7 @@ bool cmTarget::DependsOn( const std::string& lib1, const std::string& lib2,
return false; // lib1 doesn't have any dependencies
}
const std::set<std::string>& dep_set = dep_map.find(lib1)->second;
const std::set<cmStdString>& dep_set = dep_map.find(lib1)->second;
if( dep_set.end() != dep_set.find( lib2 ) )
{
@ -399,7 +399,7 @@ bool cmTarget::DependsOn( const std::string& lib1, const std::string& lib2,
}
// Do a recursive check: does lib1 depend on x which depends on lib2?
for( std::set<std::string>::const_iterator itr = dep_set.begin();
for( std::set<cmStdString>::const_iterator itr = dep_set.begin();
itr != dep_set.end(); ++itr )
{
if( this->DependsOn( *itr, lib2, dep_map, visited ) )

View File

@ -113,7 +113,7 @@ public:
*/
void AddUtility(const char* u) { m_Utilities.insert(u);}
///! Get the utilities used by this target
std::set<std::string>const& GetUtilities() const { return m_Utilities; }
std::set<cmStdString>const& GetUtilities() const { return m_Utilities; }
void AnalyzeLibDependencies( const cmMakefile& mf );
@ -122,12 +122,12 @@ private:
* This map holds the dependency graph. map[x] returns a set of
* direct dependencies of x.
*/
typedef std::map< std::string, std::set< std::string > > DependencyMap;
typedef std::map< cmStdString, std::set< cmStdString > > DependencyMap;
/**
* Maps a library name to its internal structure
*/
typedef std::map< std::string, std::pair<std::string,LinkLibraryType> > LibTypeMap;
typedef std::map< cmStdString, std::pair<cmStdString,LinkLibraryType> > LibTypeMap;
/**
* Emits the library \param lib and all its dependencies into
@ -139,8 +139,8 @@ private:
*/
void Emit( const std::string& lib,
const DependencyMap& dep_map,
std::set<std::string>& emitted,
std::set<std::string>& visited,
std::set<cmStdString>& emitted,
std::set<cmStdString>& visited,
std::vector<std::string>& link_line ) const;
/**
@ -161,7 +161,7 @@ private:
*/
bool DependsOn( const std::string& lib1, const std::string& lib2,
const DependencyMap& dep_map,
std::set<std::string>& visited ) const;
std::set<cmStdString>& visited ) const;
private:
std::vector<cmCustomCommand> m_CustomCommands;
@ -169,11 +169,11 @@ private:
TargetType m_TargetType;
std::vector<cmSourceFile*> m_SourceFiles;
LinkLibraries m_LinkLibraries;
std::set<std::string> m_PrevLinkedLibraries;
std::set<cmStdString> m_PrevLinkedLibraries;
std::vector<std::string> m_LinkDirectories;
bool m_InAll;
std::string m_InstallPath;
std::set<std::string> m_Utilities;
std::set<cmStdString> m_Utilities;
};
typedef std::map<cmStdString,cmTarget> cmTargets;

View File

@ -907,8 +907,8 @@ void cmUnixMakefileGenerator::OutputDependLibs(std::ostream& fout)
}
// Now, look at all utilities specific to this target.
const std::set<std::string>& tutils = l->second.GetUtilities();
for(std::set<std::string>::const_iterator util = tutils.begin();
const std::set<cmStdString>& tutils = l->second.GetUtilities();
for(std::set<cmStdString>::const_iterator util = tutils.begin();
util != tutils.end(); ++util)
{
// Record that this utility was used.