summaryrefslogtreecommitdiff
path: root/src/task.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/task.h')
-rw-r--r--src/task.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/task.h b/src/task.h
index 7068c8a..4cbd126 100644
--- a/src/task.h
+++ b/src/task.h
@@ -35,10 +35,16 @@ public:
virtual int clean() = 0 ;
virtual std::vector<std::string> depends() const = 0;
virtual std::string target() const = 0;
+
+ //! Returns true for tasks that are non-target tasks, ie. for example derived
+ //! objects files from target sources.
virtual bool derived() const = 0;
virtual std::string toJSON() const { return {}; };
+ //! Returns a reference to the originating build config.
+ //! Note: the build config of a derived task will be that of its parent
+ //! (target) task.
const BuildConfiguration& buildConfig() const;
TargetType targetType() const;
@@ -48,6 +54,8 @@ public:
std::list<std::shared_ptr<Task>> getDependsTasks();
+ virtual std::string source() const { return {}; }
+
protected:
std::atomic<State> task_state{State::Unknown};
virtual int runInner() { return 0; };