summaryrefslogtreecommitdiff
path: root/src/task.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2021-11-14 18:06:58 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2021-11-20 19:05:09 +0100
commit0159b72dbf048b0aa7d7b9ae85715205cb801e50 (patch)
tree74c1f613cc768c962a621c377ac1d59e40280a67 /src/task.h
parent3c29644d3bc8c4daad68ab92003a9e754f39de2a (diff)
Evaluate externals in configure step end read from config map during compilation.
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; };