diff options
Diffstat (limited to 'task.h')
-rw-r--r-- | task.h | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -7,6 +7,8 @@ #include <list> #include <memory> +#include "libcppbuild.h" + enum class State { Unknown, @@ -19,7 +21,8 @@ enum class State class Task { public: - Task(const std::vector<std::string>& depends); + Task(const BuildConfiguration& config, + const std::vector<std::string>& depends = {}); int registerDepTasks(const std::list<std::shared_ptr<Task>>& tasks); @@ -33,6 +36,11 @@ public: virtual std::string toJSON() const { return {}; }; + const BuildConfiguration& buildConfig() const; + + TargetType targetType() const; + Language language() const; + protected: std::atomic<State> task_state{State::Unknown}; virtual int runInner() { return 0; }; @@ -40,4 +48,7 @@ protected: std::vector<std::string> dependsStr; std::list<std::shared_ptr<Task>> dependsTasks; + const BuildConfiguration& config; + TargetType target_type{TargetType::Auto}; + Language _language{Language::Auto}; }; |