]> git.tdb.fi Git - builder.git/blobdiff - source/compilecommandsgenerator.cpp
Redesign how tools are run
[builder.git] / source / compilecommandsgenerator.cpp
index 855a80a3307db63e3e4f24222e8c092c1ba33f00..bbd4e980742c70c96621d234ff7eeda0845a1c0c 100644 (file)
 using namespace std;
 using namespace Msp;
 
-Target *CompileCommandsGenerator::create_target(const vector<Target *> &, const string &)
+CompileCommandsGenerator::CompileCommandsGenerator(Builder &b):
+       Tool(b, "CCJG")
 {
-       throw logic_error("Not implemented");
+       set_run_internal(_run);
 }
 
-Task *CompileCommandsGenerator::run(const Target &target) const
+Target *CompileCommandsGenerator::create_target(const vector<Target *> &, const string &)
 {
-       const CompileCommandsJson &cmds = dynamic_cast<const CompileCommandsJson &>(target);
-       return new InternalTask([&cmds]{ return _run(cmds); });
+       throw logic_error("Not implemented");
 }
 
 bool CompileCommandsGenerator::_run(const CompileCommandsJson &cmds)