summaryrefslogtreecommitdiffhomepage
path: root/Builder.h
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2024-05-12 16:07:53 +0200
committerRoland Reichwein <mail@reichwein.it>2024-05-12 16:07:53 +0200
commit8a4dfbbbe76a2aef35427b7915d6e28bab165c43 (patch)
tree5df3fe373ca755d51d8b06b7515ca3c296f54cc6 /Builder.h
parenta7e016c2c633667b561a0f26ebde88cb26571d1c (diff)
Build static and dynamic libs
Diffstat (limited to 'Builder.h')
-rw-r--r--Builder.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/Builder.h b/Builder.h
index 42c5af4..bd11599 100644
--- a/Builder.h
+++ b/Builder.h
@@ -1,6 +1,7 @@
#pragma once
#include <filesystem>
+#include <functional>
#include <string>
#include <unordered_map>
#include <unordered_set>
@@ -19,10 +20,10 @@ public:
void build();
void run_tests();
- void clean() const;
+ void clean();
private:
- std::unordered_map<std::filesystem::path, std::vector<std::filesystem::path>> get_dependencies(const boost::property_tree::ptree& ptree) const;
+ std::unordered_map<std::filesystem::path, std::vector<std::filesystem::path>> get_dependencies(const boost::property_tree::ptree& ptree, bool include_sources = true) const;
std::vector<std::filesystem::path> dependencies_of(const std::filesystem::path& p) const;
std::vector<std::filesystem::path> include_paths_of_object(const std::filesystem::path& p) const;
std::filesystem::path target_from_object(const std::filesystem::path& object) const;
@@ -31,6 +32,7 @@ private:
bool is_outdated(const std::filesystem::path& p, const std::vector<std::filesystem::path> &dependencies) const;
std::vector<std::filesystem::path> make_depfile_from(const std::filesystem::path& p) const;
std::filesystem::path get_compile_unit_source_from_object(const std::filesystem::path& path);
+ std::unordered_set<std::filesystem::path> get_buildlist(std::function<bool(const std::filesystem::path&)> outdated_pred);
void build_file(const std::filesystem::path& p);
void build_filelist();