aboutsummaryrefslogtreecommitdiff
path: root/build2/utility
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-03-14 13:30:47 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-03-14 13:30:47 +0200
commitbbff2b69459a370afd6c74b6b0d3bb080ff22b89 (patch)
treee0528ae3ffd46bdaa0b76063edb918bf1dc93de6 /build2/utility
parent10dfd69f4a714f8df2ea98e8cd2ff9359a63016a (diff)
Add support for guessing ar/ranlib signatures
Diffstat (limited to 'build2/utility')
-rw-r--r--build2/utility11
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.