aboutsummaryrefslogtreecommitdiff
path: root/bdep/project.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-03-08 16:50:59 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-03-08 16:50:59 +0200
commitf9ebe2d1e920df001be2dd543a63677f8728f53d (patch)
treefb2e4a29a10bc9da85a42b827fbdff6a4f5ada3f /bdep/project.hxx
parent1c36adab776a900adc7325f412b1c8dd61b1a346 (diff)
Handle command line project/packages discovery
Diffstat (limited to 'bdep/project.hxx')
-rw-r--r--bdep/project.hxx33
1 files changed, 33 insertions, 0 deletions
diff --git a/bdep/project.hxx b/bdep/project.hxx
new file mode 100644
index 0000000..6a748d5
--- /dev/null
+++ b/bdep/project.hxx
@@ -0,0 +1,33 @@
+// file : bdep/project.hxx -*- C++ -*-
+// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
+// license : MIT; see accompanying LICENSE file
+
+#ifndef BDEP_PROJECT_HXX
+#define BDEP_PROJECT_HXX
+
+#include <bdep/types.hxx>
+#include <bdep/utility.hxx>
+
+#include <bdep/project-options.hxx>
+
+namespace bdep
+{
+ // Given project_options (and CWD) locate the packages and their project.
+ // The result is the absolute and normalized project directory and a vector
+ // of relative (to the project directory) package directories (which will be
+ // empty if ignore_packages is true).
+ //
+ // Note that if the package directory is the same as project, then the
+ // package directory will be empty (and not ./).
+ //
+ struct project_packages
+ {
+ dir_path project;
+ dir_paths packages;
+ };
+
+ project_packages
+ find_project_packages (const project_options&, bool ignore_packages = false);
+}
+
+#endif // BDEP_PROJECT_HXX