#pragma once #include #include #include #include #include #include "ProcessRunner.h" class Builder { public: Builder(const boost::property_tree::ptree& ptree); void build(); void clean() const; private: std::vector dependencies_of(const std::filesystem::path& p) const; bool is_outdated(const std::filesystem::path& p) const; void build_file(const std::filesystem::path& p); void build_filelist(); void cleanup(); std::vector _all_targets; std::vector _all_objects; std::unordered_map> _dependencies; ProcessRunner _runner; std::unordered_set _buildlist; // build done std::unordered_set _activelist; // currently building std::unordered_set _donelist; // build done };