From 5da56616cccf4e595ec6a556cf1aef40b37746e3 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 28 Aug 2021 18:59:29 +0200 Subject: Move sources to ... well, src ;) --- task.h | 60 ------------------------------------------------------------ 1 file changed, 60 deletions(-) delete mode 100644 task.h (limited to 'task.h') diff --git a/task.h b/task.h deleted file mode 100644 index 98363a1..0000000 --- a/task.h +++ /dev/null @@ -1,60 +0,0 @@ -// -*- c++ -*- -#pragma once - -#include -#include -#include -#include -#include - -#include "libcppbuild.h" - -enum class State -{ - Unknown, - Ready, - Running, - Done, - Error, -}; - -class Task -{ -public: - Task(const BuildConfiguration& config, - const std::vector& depends = {}); - - int registerDepTasks(const std::list>& tasks); - - virtual std::string name() const; - bool dirty(); - bool ready(); - int run(); - State state() const; - virtual int clean() = 0 ; - virtual std::vector depends() const = 0; - virtual std::string target() const = 0; - - virtual std::string toJSON() const { return {}; }; - - const BuildConfiguration& buildConfig() const; - - TargetType targetType() const; - Language sourceLanguage() const; - OutputSystem outputSystem() const; - std::string compiler() const; - - std::list> getDependsTasks(); - -protected: - std::atomic task_state{State::Unknown}; - virtual int runInner() { return 0; }; - virtual bool dirtyInner() { return false; } - - std::vector dependsStr; - std::list> dependsTasks; - const BuildConfiguration& config; - TargetType target_type{TargetType::Auto}; - Language source_language{Language::Auto}; - OutputSystem output_system{OutputSystem::Host}; -}; -- cgit v1.2.3