From 01a3fda266073b58a4de6dd61417bb2d0e3ecf9e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 17 Sep 2015 13:52:35 +0200 Subject: Add run_b() function to run build2 --- bpkg/cfg-create.cxx | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) (limited to 'bpkg/cfg-create.cxx') diff --git a/bpkg/cfg-create.cxx b/bpkg/cfg-create.cxx index 2fa001c..f56754a 100644 --- a/bpkg/cfg-create.cxx +++ b/bpkg/cfg-create.cxx @@ -112,38 +112,7 @@ namespace bpkg // Configure. // - { - cstrings args {"b"}; - - // Map verbosity level. If we are running quiet or at level 1, - // then run build2 quiet. Otherwise, run it at the same level - // as us. - // - string vl; - if (verb <= 1) - args.push_back ("-q"); - else if (verb == 2) - args.push_back ("-v"); - else - { - vl = to_string (verb); - args.push_back ("--verbose"); - args.push_back (vl.c_str ()); - } - - // Add config vars. - // - for (const string& v: vars) - args.push_back (v.c_str ()); - - // Add buildspec. - // - string bspec ("configure(" + d.string () + "/)"); - args.push_back (bspec.c_str ()); - - args.push_back (nullptr); - run (args); - } + run_b ("configure(" + d.string () + "/)", vars); // Create the database. // -- cgit v1.1