list<ObjectFile *> objs;
for(Target *s: sources)
- {
- if(ObjectFile *obj = dynamic_cast<ObjectFile *>(s))
- objs.push_back(obj);
- else
- throw invalid_argument("GnuArchiver::create_target");
- }
+ objs.push_back(&dynamic_cast<ObjectFile &>(*s));
const Component &comp = *objs.front()->get_component();
StaticLibrary *lib = new StaticLibrary(builder, comp, objs);
return lib;
}
-string GnuArchiver::create_build_signature(const BuildInfo &) const
-{
- return FS::basename(executable->get_path());
-}
-
Task *GnuArchiver::run(const Target &target) const
{
const StaticLibrary &lib = dynamic_cast<const StaticLibrary &>(target);