mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-27 09:29:15 -05:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user