#include "builder.h"
#include "component.h"
#include "csourcefile.h"
-#include "externaltask.h"
#include "gnucompiler.h"
#include "objcsourcefile.h"
#include "objectfile.h"
throw invalid_argument("GnuCompiler::GnuCompiler");
set_command((tag=="CXX" ? "g++" : "gcc"), true);
- set_run(_run);
+ set_run_external(_run);
}
Target *GnuCompiler::create_source(const Component &comp, const FS::Path &path) const
return ver;
}
-Task *GnuCompiler::_run(const ObjectFile &object)
+ExternalTask::Arguments GnuCompiler::_run(const ObjectFile &object, FS::Path &work_dir)
{
const Tool &tool = *object.get_tool();
const Architecture &arch = *tool.get_architecture();
FS::Path obj_path = object.get_path();
FS::Path src_path = object.get_source().get_path();
- FS::Path work_dir = object.get_component()->get_package().get_source_directory();
argv.push_back("-o");
argv.push_back(relative(obj_path, work_dir).str());
argv.push_back(relative(src_path, work_dir).str());
- return new ExternalTask(argv, work_dir);
+ return argv;
}