diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2021-09-06 19:22:56 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2021-09-24 11:37:05 +0300 |
commit | 28de3ed8416c20ab54527e5cc8a48c46de3bb9b5 (patch) | |
tree | 70d8b5843ab0d990f03cb6277ad340b797d4a17c /libbrep/common.hxx | |
parent | a9b630f95ba352430f1f25d25b538672fddce93c (diff) |
Add support for requires, tests, examples, benchmarks, and host task manifest values
Diffstat (limited to 'libbrep/common.hxx')
-rw-r--r-- | libbrep/common.hxx | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/libbrep/common.hxx b/libbrep/common.hxx index 73353c7..0899dc9 100644 --- a/libbrep/common.hxx +++ b/libbrep/common.hxx @@ -9,6 +9,7 @@ #include <type_traits> // static_assert #include <odb/query.hxx> +#include <odb/nested-container.hxx> #include <libbpkg/package-name.hxx> @@ -355,6 +356,33 @@ namespace brep ? brep::to_unbuildable_reason (*(?)) \ : brep::optional_unbuildable_reason ()) \ + // version_constraint + // + using bpkg::version_constraint; + + #pragma db value(version_constraint) definition + + // test_dependency_type + // + using bpkg::test_dependency_type; + using bpkg::to_test_dependency_type; + + #pragma db map type(test_dependency_type) as(string) \ + to(to_string (?)) \ + from(brep::to_test_dependency_type (?)) + + // requirements + // + using bpkg::requirement_alternatives; + using requirements = vector<requirement_alternatives>; + + #pragma db value(requirement_alternatives) definition + + using requirement_key = odb::nested_key<requirement_alternatives>; + using requirement_alternatives_map = std::map<requirement_key, string>; + + #pragma db value(requirement_key) + // Version comparison operators. // // They allow comparing objects that have epoch, canonical_upstream, |