]> git.tdb.fi Git - builder.git/blobdiff - source/datatool.cpp
Use the correct target as root for cleaning
[builder.git] / source / datatool.cpp
index a956984a35deb6e9aa8b19eeca274fab4513db37..9b101c7bf6187332636615af74a058ed06127c2f 100644 (file)
@@ -1,6 +1,5 @@
 #include <stdexcept>
 #include <msp/fs/utils.h>
-#include <msp/strings/format.h>
 #include "builder.h"
 #include "component.h"
 #include "datacollection.h"
@@ -16,10 +15,7 @@ using namespace Msp;
 DataTool::DataTool(Builder &b):
        Tool(b, "DATA")
 {
-       executable = builder.get_vfs().find_binary("mspdatatool");
-       if(!executable)
-               builder.problem(string(), format("Can't find executable mspdatatool for tool %s", tag));
-
+       set_command("mspdatatool");
        input_suffixes.push_back(".mdt");
 }
 
@@ -28,7 +24,7 @@ Target *DataTool::create_source(const Component &comp, const FS::Path &path) con
        return new DataTransform(builder, comp, path);
 }
 
-Target *DataTool::create_target(const list<Target *> &sources, const string &arg) const
+Target *DataTool::create_target(const list<Target *> &sources, const string &arg)
 {
        if(arg=="collection")
        {