summaryrefslogtreecommitdiff
path: root/src/task.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2024-10-02 21:20:40 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2024-10-03 12:06:38 +0200
commit0008920eed996009068fe9f71512c436577b6220 (patch)
tree60350de98747a63e1739841b966269f5e312b9ba /src/task.h
parenta38c6682e4fb1f45aa1f37d10c2480aa517ea3bc (diff)
Ensure the initial task order is preserved. Fixes bad ordering during linking.
Diffstat (limited to 'src/task.h')
-rw-r--r--src/task.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/task.h b/src/task.h
index 9e99f25..6fe1686 100644
--- a/src/task.h
+++ b/src/task.h
@@ -6,7 +6,6 @@
#include <vector>
#include <string>
#include <atomic>
-#include <set>
#include <memory>
#include <filesystem>
@@ -28,8 +27,8 @@ public:
const std::string& sourceDir);
virtual ~Task() = default;
- int registerDepTasks(const std::set<std::shared_ptr<Task>>& tasks);
- virtual int registerDepTasksInner(const std::set<std::shared_ptr<Task>>& tasks) { return 0; }
+ int registerDepTasks(const std::vector<std::shared_ptr<Task>>& tasks);
+ virtual int registerDepTasksInner(const std::vector<std::shared_ptr<Task>>& tasks) { return 0; }
bool operator==(const std::string& dep);
@@ -64,7 +63,7 @@ public:
ctor::output_system outputSystem() const;
std::string compiler() const;
- std::set<std::shared_ptr<Task>> getDependsTasks();
+ std::vector<std::shared_ptr<Task>> getDependsTasks();
virtual std::string source() const { return {}; }
@@ -74,7 +73,7 @@ protected:
virtual bool dirtyInner() { return false; }
std::vector<std::string> dependsStr;
- std::set<std::shared_ptr<Task>> dependsTasks;
+ std::vector<std::shared_ptr<Task>> dependsTasks;
const ctor::build_configuration& config;
ctor::target_type target_type{ctor::target_type::automatic};
ctor::language source_language{ctor::language::automatic};