diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-08-13 12:12:45 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-08-13 12:12:45 +0200 |
commit | 4681fdb1160939bcd32c208eae4de474d90b44c1 (patch) | |
tree | 779c5721dae844ec62901ed213cf4512f50f2c5d /libbuild2/utility.hxx | |
parent | d7571f706928dd023097540dfc88448cf80fdcdb (diff) |
Add few more run() overloads
Diffstat (limited to 'libbuild2/utility.hxx')
-rw-r--r-- | libbuild2/utility.hxx | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/libbuild2/utility.hxx b/libbuild2/utility.hxx index b747667..4560a73 100644 --- a/libbuild2/utility.hxx +++ b/libbuild2/utility.hxx @@ -331,9 +331,24 @@ namespace build2 } inline void + run (const process_env& pe, // Implicit-constructible from process_path. + const char* args[]) + { + process pr (run_start (pe, args, 0, 1, true)); + run_finish (args, pr); + } + + inline void + run (const process_env& pe, // Implicit-constructible from process_path. + cstrings& args) + { + run (pe, args.data ()); + } + + inline void run (const process_path& p, const char* args[], - const dir_path& cwd = dir_path (), + const dir_path& cwd, const char* const* env = nullptr) { process pr (run_start (process_env (p, env), args, 0, 1, true, cwd)); @@ -343,7 +358,7 @@ namespace build2 inline void run (const process_path& p, cstrings& args, - const dir_path& cwd = dir_path (), + const dir_path& cwd, const char* const* env = nullptr) { run (p, args.data (), cwd, env); |