about summary refs log tree commit diff
path: root/src/libmain/common-args.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-04-24T12·21+0200
committerEelco Dolstra <edolstra@gmail.com>2017-04-24T12·21+0200
commit66577a1c64ac5d9f07aa2c207c96e13077576a4e (patch)
treea4c55d9b74df73cefe28eb2f26cdb6968f250e06 /src/libmain/common-args.hh
parent9b63bb88c8873d192b8b01608e5d230817dd3375 (diff)
Factor out --json
Diffstat (limited to 'src/libmain/common-args.hh')
-rw-r--r--src/libmain/common-args.hh12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/libmain/common-args.hh b/src/libmain/common-args.hh
index 2c0d71edd8..a4de3dccf0 100644
--- a/src/libmain/common-args.hh
+++ b/src/libmain/common-args.hh
@@ -12,7 +12,7 @@ struct MixCommonArgs : virtual Args
 
 struct MixDryRun : virtual Args
 {
-    bool dryRun;
+    bool dryRun = false;
 
     MixDryRun()
     {
@@ -20,4 +20,14 @@ struct MixDryRun : virtual Args
     }
 };
 
+struct MixJSON : virtual Args
+{
+    bool json = false;
+
+    MixJSON()
+    {
+        mkFlag(0, "json", "produce JSON output", &json);
+    }
+};
+
 }