diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2021-04-22 21:57:13 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2021-07-01 11:19:12 +0300 |
commit | d77ca8720df495017139a24a59c502f53c07df9f (patch) | |
tree | 5093b9700607e0db35d6260ad766e7f171e2bf8f /bpkg/cfg-add.hxx | |
parent | aee787bce2b94a057ad8e6fd42e2cd901776e348 (diff) |
Add support for associated configurations
Diffstat (limited to 'bpkg/cfg-add.hxx')
-rw-r--r-- | bpkg/cfg-add.hxx | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/bpkg/cfg-add.hxx b/bpkg/cfg-add.hxx new file mode 100644 index 0000000..2059963 --- /dev/null +++ b/bpkg/cfg-add.hxx @@ -0,0 +1,40 @@ +// file : bpkg/cfg-add.hxx -*- C++ -*- +// license : MIT; see accompanying LICENSE file + +#ifndef BPKG_CFG_ADD_HXX +#define BPKG_CFG_ADD_HXX + +#include <bpkg/types.hxx> +#include <bpkg/forward.hxx> // configuration +#include <bpkg/utility.hxx> + +#include <bpkg/cfg-add-options.hxx> + +namespace bpkg +{ + int + cfg_add (const cfg_add_options&, cli::scanner& args); + + // Associate the configuration specified as the directory path with the + // current configuration, attach the associated configuration database, and + // return the association. Note that it also establishes an implicit + // association of the current configuration with the associated one. + // + // The specified configuration path must be absolute and normalized. If the + // relative argument is true, then rebase this path relative to the current + // configuration directory path and fail if that's not possible (different + // drive on Windows, etc). + // + // If the current configuration database has its explicit associations + // pre-attached, then also pre-attach explicit associations of the newly + // associated database. + // + shared_ptr<configuration> + cfg_add (database&, + const dir_path&, + bool relative, + optional<string> name, + bool sys_rep = false); +} + +#endif // BPKG_CFG_ADD_HXX |