aboutsummaryrefslogtreecommitdiff
path: root/bpkg/utility.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-12-08 11:01:26 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-12-08 11:01:26 +0200
commit2b6ae9f528504897bc24803d95bbb6da61a2a85b (patch)
tree88f136d21acc99bf4947f758ef149cf85f748663 /bpkg/utility.cxx
parent02e321b97889b558ecaad5ed03c80aee08f9c0ba (diff)
Add support for --build, --build-option common options
Diffstat (limited to 'bpkg/utility.cxx')
-rw-r--r--bpkg/utility.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/bpkg/utility.cxx b/bpkg/utility.cxx
index 9954067..099b56d 100644
--- a/bpkg/utility.cxx
+++ b/bpkg/utility.cxx
@@ -190,9 +190,12 @@ namespace bpkg
}
void
- run_b (const string& bspec, bool quiet, const strings& vars)
+ run_b (const common_options& co,
+ const string& bspec,
+ bool quiet,
+ const strings& vars)
{
- cstrings args {"b"};
+ cstrings args {co.build ().string ().c_str ()};
// Map verbosity level. If we are running quiet or at level 1,
// then run build2 quiet. Otherwise, run it at the same level
@@ -210,6 +213,11 @@ namespace bpkg
args.push_back (vl.c_str ());
}
+ // Add user options.
+ //
+ for (const string& o: co.build_option ())
+ args.push_back (o.c_str ());
+
// Add config vars.
//
for (const string& v: vars)