}
}
+ add_plugins(unordered_plugins);
+}
+
+void Builder::add_plugins(vector<LoadedPlugin> &unordered_plugins)
+{
auto have_plugin = [this](const string &r){
return any_of(plugins.begin(), plugins.end(), [&r](const LoadedPlugin &p){ return FS::basepart(FS::basename(p.path))==r; });
};
int Builder::build(unsigned jobs, bool dry_run, bool show_progress)
{
unsigned total = build_graph.count_rebuild_targets();
+ Time::TimeStamp start_time = Time::now();
if(!total)
{
vector<Task *> tasks;
unsigned count = 0;
+ Time::TimeDelta sum_time;
bool fail = false;
bool finish = false;
{
++count;
+ const vector<const FileTarget *> &targets = tasks[i]->get_targets();
+ if(!targets.empty())
+ {
+ sum_time += tasks[i]->get_duration();
+ get_logger().log("timings", "%s built in %s", targets.front()->get_name(), tasks[i]->get_duration());
+ }
+
delete tasks[i];
tasks.erase(tasks.begin()+i);
if(status==Task::ERROR)
else if(show_progress)
get_logger().log("summary", "Build complete");
+ Time::TimeStamp end_time = Time::now();
+ get_logger().log("timings", "Build took %s, with a total %s spent on tasks", end_time-start_time, sum_time);
+
return fail;
}