]> git.tdb.fi Git - builder.git/blobdiff - source/datatool.cpp
Add a utility function for setting the executable for a Tool
[builder.git] / source / datatool.cpp
index 4a4fc8a0cd89360d875bc7682de8c8b02afc6cd5..eeeec4ea68b30706a670c6b84ffd0af98d64cfdf 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"
@@ -50,9 +49,7 @@ Target *DataTool::create_target(const list<Target *> &sources, const string &arg
 
 void DataTool::do_prepare()
 {
-       executable = builder.get_vfs().find_binary("mspdatatool");
-       if(!executable)
-               builder.problem(string(), format("Can't find executable mspdatatool for tool %s", tag));
+       set_executable("mspdatatool");
 }
 
 Task *DataTool::run(const Target &tgt) const