diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2023-03-22 13:18:24 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2023-03-23 18:32:37 +0300 |
commit | 723a15c5390d0c5eb42f2082fcedb7262e7bc856 (patch) | |
tree | 7bef948322e2de710f44943e1e0dd621dc9b0d86 /libbpkg/manifest.ixx | |
parent | c97dba3a4f2af33091112a347e181a5a2edc9914 (diff) |
Add package_manifest::effective_type_sub_options()
Diffstat (limited to 'libbpkg/manifest.ixx')
-rw-r--r-- | libbpkg/manifest.ixx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libbpkg/manifest.ixx b/libbpkg/manifest.ixx index d6eb4a6..589d00f 100644 --- a/libbpkg/manifest.ixx +++ b/libbpkg/manifest.ixx @@ -242,7 +242,11 @@ namespace bpkg effective_type (const butl::optional<std::string>& t, const package_name& n) { if (t) - return *t == "exe" || *t == "lib" ? *t : "other"; + { + std::string tp (*t, 0, t->find (',')); + butl::trim (tp); + return tp == "exe" || tp == "lib" ? tp : "other"; + } const std::string& s (n.string ()); return s.size () > 3 && s.compare (0, 3, "lib") == 0 ? "lib" : "exe"; @@ -254,6 +258,12 @@ namespace bpkg return effective_type (type, name); } + inline strings package_manifest:: + effective_type_sub_options () const + { + return effective_type_sub_options (type); + } + inline butl::small_vector<language, 1> package_manifest:: effective_languages (const butl::small_vector<language, 1>& ls, const package_name& n) |