diff options
Diffstat (limited to 'src/task_cc.h')
-rw-r--r-- | src/task_cc.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/task_cc.h b/src/task_cc.h new file mode 100644 index 0000000..0ce4947 --- /dev/null +++ b/src/task_cc.h @@ -0,0 +1,47 @@ +// -*- 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& sourceDir, const std::string& source); + + std::string name() const override; + bool dirtyInner() override; + + int runInner() override; + int clean() override; + + std::vector<std::string> depends() const override; + + std::string target() const override; + + std::string toJSON() const override; + +private: + std::vector<std::string> flags() const; + std::string flagsString() const; + std::vector<std::string> getCompilerArgs() const; + + std::filesystem::path sourceFile; + std::filesystem::path targetFile; + std::filesystem::path depsFile; + std::filesystem::path flagsFile; + + const BuildConfiguration& config; + const Settings& settings; + std::filesystem::path sourceDir; +}; |