summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2024-11-21 15:04:48 +0100
committerKlaus Aehlig <klaus.aehlig@huawei.com>2024-11-21 17:16:35 +0100
commit0281f711a821785d04dfd26424979a9ab4e4a33a (patch)
tree1c33daed0f868e294fe24e946665327941dd1fe0
parent43e2b5010ba564bb545fb2aafd33abe5eb39c31c (diff)
downloadjustbuild-0281f711a821785d04dfd26424979a9ab4e4a33a.tar.gz
FileRoot::ComputedRoot: add ToString() method
-rw-r--r--src/buildtool/file_system/file_root.hpp8
1 files changed, 8 insertions, 0 deletions
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: