ENH: major change, the cmMakefile now contains a master list of cmSourceFile objects, the source lists reference the list via pointers, also you can now set properties on a file, like compile flags, abstract, etc.

This commit is contained in:
Bill Hoffman
2002-03-29 10:06:30 -05:00
parent 627ab62ce0
commit 8b3b49a010
31 changed files with 593 additions and 180 deletions
+18 -12
View File
@@ -24,23 +24,29 @@ bool cmAbstractFilesCommand::InitialPass(std::vector<std::string> const& args)
this->SetError("called with incorrect number of arguments");
return false;
}
bool ret = true;
std::string m = "could not find source file(s):\n";
cmMakefile::SourceMap &Classes = m_Makefile->GetSources();
for(std::vector<std::string>::const_iterator j = args.begin();
j != args.end(); ++j)
{
for(cmMakefile::SourceMap::iterator l = Classes.begin();
l != Classes.end(); l++)
{
cmSourceFile* sf = m_Makefile->GetSource(j->c_str());
if(sf)
{
for(std::vector<cmSourceFile>::iterator i = l->second.begin();
i != l->second.end(); i++)
{
if(i->GetSourceName() == (*j))
{
i->SetIsAnAbstractClass(true);
}
}
sf->SetIsAnAbstractClass(true);
}
else
{
m += *j;
m += "\n";
ret = false;
}
}
return true;
if(!ret)
{
this->SetError(m.c_str());
}
return ret;
}