From a3925d12af6a6ae75897d5aab25a9de0edb642fb Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 5 Sep 2016 09:24:39 +0200 Subject: Add support for build-time dependencies --- bpkg/utility.cxx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'bpkg/utility.cxx') diff --git a/bpkg/utility.cxx b/bpkg/utility.cxx index 002d316..5d37972 100644 --- a/bpkg/utility.cxx +++ b/bpkg/utility.cxx @@ -7,6 +7,7 @@ #include // cout, cin #include +#include #include #include @@ -195,6 +196,14 @@ namespace bpkg } } + const char* + name_b (const common_options& co) + { + return co.build_specified () + ? co.build ().string ().c_str () + : "b" BPKG_EXE_SUFFIX; + } + void run_b (const common_options& co, const dir_path& c, @@ -203,11 +212,7 @@ namespace bpkg const strings& pvars, const strings& cvars) { - const char* b (co.build_specified () - ? co.build ().string ().c_str () - : "b" BPKG_EXE_SUFFIX); - - cstrings args {b}; + cstrings args {name_b (co)}; // Map verbosity level. If we are running quiet or at level 1, // then run build2 quiet. Otherwise, run it at the same level -- cgit v1.1