From 19195e2bbdcd7a0db8f84732ce54b1c9d07c006c Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 13 Jun 2021 18:24:16 +0200 Subject: Make task an abstract class and make CC and LD versions of it. --- task_cc.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 task_cc.h (limited to 'task_cc.h') diff --git a/task_cc.h b/task_cc.h new file mode 100644 index 0000000..c73a1e5 --- /dev/null +++ b/task_cc.h @@ -0,0 +1,38 @@ +// -*- c++ -*- +#pragma once + +#include "task.h" + +#include +#include +#include +#include + +struct BuildConfiguration; +struct Settings; + +class TaskCC + : public Task +{ +public: + TaskCC(const BuildConfiguration& config, + const Settings& settings, + const std::string& source); + + bool dirty() override; + + int run() override; + int clean() override; + + std::vector depends() const override; + + std::string target() const override; + +private: + std::filesystem::path sourceFile; + std::filesystem::path targetFile; + std::filesystem::path depsFile; + + const BuildConfiguration& config; + const Settings& settings; +}; -- cgit v1.2.3