summaryrefslogtreecommitdiffhomepage
path: root/Builder.h
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2024-05-09 15:37:06 +0200
committerRoland Reichwein <mail@reichwein.it>2024-05-09 15:37:06 +0200
commit242b03bc8da841a9527ad845eb60275008155afb (patch)
treeca36edb74ccfe34662c8a2b1c72295df77b50254 /Builder.h
parent7dabda20e11138f2235b12271d569cd3256ebf3a (diff)
Run tests
Diffstat (limited to 'Builder.h')
-rw-r--r--Builder.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/Builder.h b/Builder.h
index 3169c3b..b167e65 100644
--- a/Builder.h
+++ b/Builder.h
@@ -1,6 +1,7 @@
#pragma once
#include <filesystem>
+#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
@@ -13,14 +14,17 @@
class Builder
{
public:
- Builder(const boost::property_tree::ptree& ptree);
+ Builder(const boost::property_tree::ptree& ptree, const std::string& target);
void build();
+ void run_tests();
+
void clean() const;
private:
std::unordered_map<std::filesystem::path, std::vector<std::filesystem::path>> get_dependencies(const boost::property_tree::ptree& ptree) const;
std::vector<std::filesystem::path> dependencies_of(const std::filesystem::path& p) const;
+ std::vector<std::filesystem::path> include_paths_of(const std::filesystem::path& p) const;
std::vector<std::string> link_libs_of(const std::filesystem::path& p) const;
bool is_outdated(const std::filesystem::path& p) const;
bool is_outdated(const std::filesystem::path& p, const std::vector<std::filesystem::path> &dependencies) const;
@@ -29,12 +33,14 @@ private:
void build_file(const std::filesystem::path& p);
void build_filelist();
- void cleanup();
+ void cleanup_buildlist();
const boost::property_tree::ptree _ptree;
+ std::string _target;
std::vector<std::filesystem::path> _all_targets;
std::vector<std::filesystem::path> _all_objects;
std::unordered_map<std::filesystem::path, std::vector<std::filesystem::path>> _dependencies;
+ std::unordered_map<std::filesystem::path, std::vector<std::filesystem::path>> _include_paths;
std::unordered_map<std::filesystem::path, std::vector<std::string>> _link_libs;
LanguageSettings _lang;