aboutsummaryrefslogtreecommitdiff
path: root/build2/utility.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-01-08 12:46:10 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-01-08 12:46:10 +0200
commit8b07d68462c5fec92fd5a4aab77ddfd425d1f8d0 (patch)
tree155b5d4e1789bdb2523081da12201d87d5fa4153 /build2/utility.hxx
parentf6c3788de3d148c90aba705d045b1d92e7fea20a (diff)
Implement compiler_info caching
Diffstat (limited to 'build2/utility.hxx')
-rw-r--r--build2/utility.hxx25
1 files changed, 15 insertions, 10 deletions
diff --git a/build2/utility.hxx b/build2/utility.hxx
index bbd6bc3..6325780 100644
--- a/build2/utility.hxx
+++ b/build2/utility.hxx
@@ -169,9 +169,6 @@ namespace build2
extern uint16_t verb;
const uint16_t verb_never = 7;
- void
- print_process (const char* const*, size_t);
-
// Basic process utilities.
//
// The run*() functions with process_path assume that you are printing
@@ -213,13 +210,25 @@ namespace build2
// error.
//
process
- run_start (const process_path&,
+ run_start (uint16_t verbosity,
+ const process_path&,
const char* args[],
int in,
int out,
bool error = true,
const dir_path& cwd = dir_path ());
+ inline process
+ run_start (const process_path& pp,
+ const char* args[],
+ int in,
+ int out,
+ bool error = true,
+ const dir_path& cwd = dir_path ())
+ {
+ return run_start (verb_never, pp, args, in, out, error, cwd);
+ }
+
inline void
run (const process_path& p,
const char* args[],
@@ -249,11 +258,7 @@ namespace build2
const dir_path& cwd = dir_path ())
{
process_path pp (run_search (args[0]));
-
- if (verb >= verbosity)
- print_process (args, 0);
-
- return run_start (pp, args, in, out, error, cwd);
+ return run_start (verbosity, pp, args, in, out, error, cwd);
}
inline void
@@ -304,7 +309,7 @@ namespace build2
sha256* checksum = nullptr);
template <typename T, typename F>
- T
+ inline T
run (const process_path& pp,
const char* args[],
F&& f,