aboutsummaryrefslogtreecommitdiff
path: root/libbpkg/manifest.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-08-19 21:21:32 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-08-19 21:22:28 +0300
commit724b68d96bb69685b0b878916e4cb89b3368705b (patch)
tree0baced5f9a08190b03e3ad7c3753a4013af50d96 /libbpkg/manifest.hxx
parent0592d58e5366eac92bc99ef9bdb4368e07c0ddf9 (diff)
Add support for build-time mark (*) in tests, examples, and benchmarks package manifest values
Diffstat (limited to 'libbpkg/manifest.hxx')
-rw-r--r--libbpkg/manifest.hxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/libbpkg/manifest.hxx b/libbpkg/manifest.hxx
index bdb7a9b..1b62512 100644
--- a/libbpkg/manifest.hxx
+++ b/libbpkg/manifest.hxx
@@ -694,12 +694,22 @@ namespace bpkg
struct test_dependency: dependency
{
test_dependency_type type;
+ bool buildtime;
test_dependency () = default;
test_dependency (package_name n,
test_dependency_type t,
+ bool b,
butl::optional<version_constraint> c)
- : dependency {std::move (n), std::move (c)}, type (t) {}
+ : dependency {std::move (n), std::move (c)}, type (t), buildtime (b) {}
+
+ inline std::string
+ string () const
+ {
+ return buildtime
+ ? "* " + dependency::string ()
+ : dependency::string ();
+ }
};
class LIBBPKG_EXPORT package_manifest