aboutsummaryrefslogtreecommitdiff
path: root/bdep/project.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-03-15 15:24:48 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-03-15 15:24:48 +0200
commit4f6abb0576e810b37d56ad3cafc67fac84682ec2 (patch)
treea8dbf336cea736b99a7ece1cb1e32b985e9f7934 /bdep/project.cxx
parentb44b4088f48a27bff88f8f010b8cd42303cbdad0 (diff)
Implement status command
Diffstat (limited to 'bdep/project.cxx')
-rw-r--r--bdep/project.cxx22
1 files changed, 22 insertions, 0 deletions
diff --git a/bdep/project.cxx b/bdep/project.cxx
index e09371e..64f82ca 100644
--- a/bdep/project.cxx
+++ b/bdep/project.cxx
@@ -326,4 +326,26 @@ namespace bdep
return r;
}
+
+ void
+ verify_project_packages (const project_packages& pp,
+ const configurations& cfgs)
+ {
+ for (const shared_ptr<configuration>& c: cfgs)
+ {
+ for (const package_location& p: pp.packages)
+ {
+ if (find_if (c->packages.begin (),
+ c->packages.end (),
+ [&p] (const package_state& s)
+ {
+ return p.name == s.name;
+ }) == c->packages.end ())
+ {
+ fail << "package " << p.name << " is not initialized "
+ << "in configuration " << *c;
+ }
+ }
+ }
+ }
}