diff options
Diffstat (limited to 'build2/utility')
-rw-r--r-- | build2/utility | 11 |
1 files changed, 9 insertions, 2 deletions
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 <typename T> @@ -97,6 +101,7 @@ namespace build2 run (const char* const* args, T (*) (string&), bool error = true, + bool ignore_exit = false, sha256* checksum = nullptr); template <typename T> @@ -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<T> (args, f, error, checksum); + return run<T> (args, f, error, ignore_exit, checksum); } template <typename T> @@ -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<T> (args, f, error, checksum); + return run<T> (args, f, error, ignore_exit, checksum); } // Empty string and path. |