From bbff2b69459a370afd6c74b6b0d3bb080ff22b89 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 14 Mar 2016 13:30:47 +0200 Subject: Add support for guessing ar/ranlib signatures --- build2/utility | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'build2/utility') diff --git a/build2/utility b/build2/utility index 0c442b0..a3f9be4 100644 --- a/build2/utility +++ b/build2/utility @@ -90,6 +90,10 @@ namespace build2 // is false, only in case of a "content match" (so that any diagnostics // lines are left intact). // + // If ignore_exit is true, then the program's exist status is ignored (if it + // is false and the program exits with the non-zero status, then an empty T + // instance is returned). + // // If checksum is not NULL, then feed it the content of each line. // template @@ -97,6 +101,7 @@ namespace build2 run (const char* const* args, T (*) (string&), bool error = true, + bool ignore_exit = false, sha256* checksum = nullptr); template @@ -104,10 +109,11 @@ namespace build2 run (const path& prog, T (*f) (string&), bool error = true, + bool ignore_exit = false, sha256* checksum = nullptr) { const char* args[] = {prog.string ().c_str (), nullptr}; - return run (args, f, error, checksum); + return run (args, f, error, ignore_exit, checksum); } template @@ -116,10 +122,11 @@ namespace build2 const char* arg, T (*f) (string&), bool error = true, + bool ignore_exit = false, sha256* checksum = nullptr) { const char* args[] = {prog.string ().c_str (), arg, nullptr}; - return run (args, f, error, checksum); + return run (args, f, error, ignore_exit, checksum); } // Empty string and path. -- cgit v1.1