From dcaa89ffa1dc471b014119987e6a06d2bf648487 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 23 Aug 2021 10:12:08 +0200 Subject: Make automatically-created host configuration non-default --- bdep/config.cxx | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'bdep/config.cxx') diff --git a/bdep/config.cxx b/bdep/config.cxx index 31f4c14..6929fb7 100644 --- a/bdep/config.cxx +++ b/bdep/config.cxx @@ -212,13 +212,20 @@ namespace bdep cmd_config_add_print (diag_record& dr, const dir_path& prj, const dir_path& path, - const optional& name) + const optional& name, + bool def, + bool fwd, + bool asy) { dr << "bdep config add -d " << quote (prj); if (name) dr << " @" << *name; + dr << (def ? " --default" : " --no-default"); + dr << (fwd ? " --forward" : " --no-forward"); + dr << (asy ? "" : " --no-auto-sync"); + dr << ' ' << quote (path); } @@ -478,14 +485,23 @@ namespace bdep const dir_path& prj, const dir_path& path, const optional& name, - const string& type) + const string& type, + bool def, + bool fwd, + bool asy) { - dr << "bdep config create -d " << quote (prj) - << " --config-type " << type; + dr << "bdep config create -d " << quote (prj); if (name) dr << " @" << *name; + if (type != "target") + dr << " --config-type " << type; + + dr << (def ? " --default" : " --no-default"); + dr << (fwd ? " --forward" : " --no-forward"); + dr << (asy ? "" : " --no-auto-sync"); + dr << ' ' << quote (path); } -- cgit v1.1