From 5ecd32cb842defe38e14dcaeb0caa2d98356a0bb Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Fri, 3 May 2024 11:22:55 +0200 Subject: Factored out Builder --- builder.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 builder.h (limited to 'builder.h') diff --git a/builder.h b/builder.h new file mode 100644 index 0000000..c139d2a --- /dev/null +++ b/builder.h @@ -0,0 +1,29 @@ +#pragma once + +#include +#include +#include +#include + +#include + +class Builder +{ +public: + Builder(const boost::property_tree::ptree& ptree); + + void build(); + void clean(); + +private: + std::vector dependencies_of(const std::filesystem::path& p); + bool is_outdated(const std::filesystem::path& p); + + void build(const std::filesystem::path& p); + void build(std::unordered_set& buildlist); + + std::filesystem::path _target; + std::vector _objects; + std::vector _sources; + std::unordered_map> _dependencies; +}; -- cgit v1.2.3