diff options
Diffstat (limited to 'build/diagnostics')
-rw-r--r-- | build/diagnostics | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/build/diagnostics b/build/diagnostics index c8fb169..98f481f 100644 --- a/build/diagnostics +++ b/build/diagnostics @@ -6,9 +6,12 @@ #define BUILD_DIAGNOSTICS #include <tuple> +#include <vector> #include <utility> #include <exception> +#include <build/trace> + namespace build { // Throw this exception to terminate the build. The handler should @@ -16,6 +19,17 @@ namespace build // class error: public std::exception {}; + // Print process commmand line. + // + void + print_process (const char* const* args); + + inline void + print_process (const std::vector<const char*>& args) + { + print_process (args.data ()); + } + // Call a function if there is an exception. // template <typename F, typename T> |