diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2021-07-21 21:31:18 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2021-08-05 12:36:07 +0300 |
commit | 9664d2849ee30d63cd10ce5b258f1433a650b488 (patch) | |
tree | 89fa1d8de3ee56be6e76f49803ee2888516d902b /bdep/sync.hxx | |
parent | eb02d377f4f10e23cc6673e9e8f048b4ecbc8492 (diff) |
Add support for automatic creation of configurations for build-time dependencies
Diffstat (limited to 'bdep/sync.hxx')
-rw-r--r-- | bdep/sync.hxx | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/bdep/sync.hxx b/bdep/sync.hxx index 725377e..d3f5429 100644 --- a/bdep/sync.hxx +++ b/bdep/sync.hxx @@ -20,6 +20,21 @@ namespace bdep // name_cfg is true then include the configuration name/directory into // progress. // + // Before automatically creating a configuration for a build-time dependency + // and associating it with the project(s), the user is prompted unless the + // respective create_*_config argument is true. + // + // If the transaction is already started on the project's database, then it + // must also be passed to the function along with a pointer to the + // configuration paths/types list. If the function will be associating + // build-time dependency configurations with the project, it will do it as + // part of this transaction and will also save the created dependency + // configurations into this list. If this transaction is rolled back for any + // reason (for example, because the failed exception is thrown by cmd_sync() + // call), then the caller must start the new transaction and re-associate + // the created configurations with the project using the configuration types + // also as their names. + // void cmd_sync (const common_options&, const dir_path& prj, @@ -28,7 +43,11 @@ namespace bdep bool implicit, bool fetch = true, bool yes = true, - bool name_cfg = false); + bool name_cfg = false, + bool create_host_config = false, + bool create_build2_config = false, + transaction* = nullptr, + vector<pair<dir_path, string>>* created_cfgs = nullptr); // As above but perform an implicit sync without a configuration object // (i.e., as if from the hook). @@ -38,12 +57,13 @@ namespace bdep const dir_path& cfg, bool fetch = true, bool yes = true, - bool name_cfg = true); + bool name_cfg = true, + bool create_host_config = false, + bool create_build2_config = false); int cmd_sync (cmd_sync_options&&, cli::group_scanner& args); - // Return the list of additional (to prj, if not empty) projects that are // using this configuration. // |