summaryrefslogtreecommitdiffstats
path: root/Source/cmAbstractFilesCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmAbstractFilesCommand.cxx')
-rw-r--r--Source/cmAbstractFilesCommand.cxx30
1 files changed, 18 insertions, 12 deletions
diff --git a/Source/cmAbstractFilesCommand.cxx b/Source/cmAbstractFilesCommand.cxx
index 9c43968..32a6237 100644
--- a/Source/cmAbstractFilesCommand.cxx
+++ b/Source/cmAbstractFilesCommand.cxx
@@ -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;
+ }
+ }
+ if(!ret)
+ {
+ this->SetError(m.c_str());
}
- return true;
+ return ret;
}