aboutsummaryrefslogtreecommitdiff
path: root/bdep/project.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-03-10 22:15:57 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-03-11 12:53:14 +0300
commita6f2a14c328000950f6055ab41c967145ec718db (patch)
tree9a87609466501bc64d3733c720cbcfb678fa2b70 /bdep/project.hxx
parent60fe5f8f374d9c680d0458394ac795830eb7e342 (diff)
Make bdep fail if -d option doesn't refer to project or package root
Diffstat (limited to 'bdep/project.hxx')
-rw-r--r--bdep/project.hxx19
1 files changed, 11 insertions, 8 deletions
diff --git a/bdep/project.hxx b/bdep/project.hxx
index 35b9441..86b833f 100644
--- a/bdep/project.hxx
+++ b/bdep/project.hxx
@@ -178,13 +178,13 @@ namespace bdep
bool fallback_default = true,
bool validate = true);
- // Given a directory which can be a project root, a package root, or one of
- // their subdirectories, return the absolute project (first) and relative
- // package (second) directories. The package directory may be absent if the
- // given directory is not within a package root or empty if the project and
- // package roots are the same.
+ // Given a directory which can be a project root, a package root, or, if
+ // requested, one of their subdirectories, return the absolute project
+ // (first) and relative package (second) directories. The package directory
+ // may be absent if the given directory is not within a package root or
+ // empty if the project and package roots are the same.
//
- // If ignore_not_found is true then insteading of issuing diagnostics and
+ // If ignore_not_found is true then instead of issuing diagnostics and
// failing return empty project directory if no project is found.
//
struct project_package
@@ -194,7 +194,9 @@ namespace bdep
};
project_package
- find_project_package (const dir_path&, bool ignore_not_found = false);
+ find_project_package (const dir_path&,
+ bool allow_subdir,
+ bool ignore_not_found = false);
// Given the project options (and CWD) locate the packages and their
// project. The result is an absolute and normalized project directory and a
@@ -227,7 +229,8 @@ namespace bdep
};
// Search project packages in the specified directories or the current
- // directory if none were specified.
+ // directory if none were specified. Fail if the specified directories are
+ // not project or package root directories.
//
project_packages
find_project_packages (const dir_paths&,