aboutsummaryrefslogtreecommitdiff
path: root/build2/dump.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-11-20 13:11:59 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-11-20 18:29:45 +0200
commit9964a9aca03b38c2959994e0fdc91014da252cb8 (patch)
tree4c263c8f9ee422de9f27aecdb05a040ee116ddae /build2/dump.hxx
parent4184f61e2b795dd4c4b4a974a890bdaf98906b82 (diff)
Implement dump directive
It can be used to print (to stderr) a human-readable representation of the current scope or a list of targets. For example: dump # Dump current scope. dump lib{foo} details/exe{bar} # Dump two targets. This is primarily useful for debugging as well as to write build system tests.
Diffstat (limited to 'build2/dump.hxx')
-rw-r--r--build2/dump.hxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/build2/dump.hxx b/build2/dump.hxx
index e456540..8330708 100644
--- a/build2/dump.hxx
+++ b/build2/dump.hxx
@@ -8,14 +8,21 @@
#include <build2/types.hxx>
#include <build2/utility.hxx>
-#include <build2/operation.hxx>
-
namespace build2
{
- // Dump the state pertaining to the current action.
+ class scope;
+ class target;
+
+ // Dump the build state to diag_stream.
//
void
dump ();
+
+ void
+ dump (const scope&, const char* ind = "");
+
+ void
+ dump (const target&, const char* ind = "");
}
#endif // BUILD2_DUMP_HXX