summaryrefslogtreecommitdiff
path: root/task_cc.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2021-06-13 18:24:16 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2021-06-13 18:24:16 +0200
commit19195e2bbdcd7a0db8f84732ce54b1c9d07c006c (patch)
treeb974b648ebacd645fbee000575268326f3b7bfbc /task_cc.h
parentf6f5f31067cdee2d7003d8209361ac9e5b6975c5 (diff)
Make task an abstract class and make CC and LD versions of it.
Diffstat (limited to 'task_cc.h')
-rw-r--r--task_cc.h38
1 files changed, 38 insertions, 0 deletions
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 <vector>
+#include <string>
+#include <future>
+#include <filesystem>
+
+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<std::string> 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;
+};