aboutsummaryrefslogtreecommitdiff
path: root/bdep/project.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'bdep/project.hxx')
-rw-r--r--bdep/project.hxx34
1 files changed, 34 insertions, 0 deletions
diff --git a/bdep/project.hxx b/bdep/project.hxx
index c40fe61..e9ec3c4 100644
--- a/bdep/project.hxx
+++ b/bdep/project.hxx
@@ -241,6 +241,11 @@ namespace bdep
{
dir_path project;
package_locations packages;
+
+ // Append package locations suppressing duplicates.
+ //
+ void
+ append (package_locations&&);
};
// Search project packages in the specified directories or the current
@@ -274,6 +279,35 @@ namespace bdep
return find_project_packages (o, true /* ignore_packages */).project;
}
+ // Search for the specified package names in the specified project
+ // directory. Fail if some packages are not found in the project, unless
+ // ignore_not_found is true in which case return them in the second half of
+ // the pair.
+ //
+ pair<project_packages, strings>
+ find_project_packages (dir_path,
+ const strings&,
+ bool ignore_not_found = false,
+ bool allow_empty = false);
+
+ inline pair<project_packages, strings>
+ find_project_packages (const dir_paths& dirs,
+ const strings& pkgs,
+ bool ignore_nf = false,
+ bool ae = false)
+ {
+ return find_project_packages (find_project (dirs), pkgs, ignore_nf, ae);
+ }
+
+ inline pair<project_packages, strings>
+ find_project_packages (const project_options& po,
+ const strings& pkgs,
+ bool ignore_nf = false,
+ bool ae = false)
+ {
+ return find_project_packages (po.directory (), pkgs, ignore_nf, ae);
+ }
+
// Verify that each package is present in at least one configuration.
//
// Note that the default configurations fallback indication (see above) is