From 0281f711a821785d04dfd26424979a9ab4e4a33a Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Thu, 21 Nov 2024 15:04:48 +0100 Subject: FileRoot::ComputedRoot: add ToString() method --- src/buildtool/file_system/file_root.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/buildtool/file_system/file_root.hpp') diff --git a/src/buildtool/file_system/file_root.hpp b/src/buildtool/file_system/file_root.hpp index 5db6ed82..adbc3352 100644 --- a/src/buildtool/file_system/file_root.hpp +++ b/src/buildtool/file_system/file_root.hpp @@ -141,6 +141,14 @@ class FileRoot { } return config < other.config; } + + [[nodiscard]] auto ToString() const -> std::string { + return fmt::format("([\"@\", {}, {}, {}], {})", + nlohmann::json(repository).dump(), + nlohmann::json(target_module).dump(), + nlohmann::json(target_name).dump(), + config.dump()); + } }; private: -- cgit v1.2.3