[vala/switch-to-gir] vapigen: Add --disable-warnings and use --quiet to tune reports verbosity
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/switch-to-gir] vapigen: Add --disable-warnings and use --quiet to tune reports verbosity
- Date: Wed, 25 Aug 2010 21:00:27 +0000 (UTC)
commit d9c2f3fb24b5ddf20a8048bc4a597661c86ba98d
Author: Luca Bruno <lethalman88 gmail com>
Date: Wed Aug 25 20:43:38 2010 +0200
vapigen: Add --disable-warnings and use --quiet to tune reports verbosity
vapigen/valavapigen.vala | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/vapigen/valavapigen.vala b/vapigen/valavapigen.vala
index 8dc9d0a..0d1f06c 100644
--- a/vapigen/valavapigen.vala
+++ b/vapigen/valavapigen.vala
@@ -26,6 +26,7 @@ class Vala.VAPIGen : Object {
static string directory;
static bool version;
static bool quiet_mode;
+ static bool disable_warnings;
[CCode (array_length = false, array_null_terminated = true)]
static string[] sources;
[CCode (array_length = false, array_null_terminated = true)]
@@ -43,6 +44,7 @@ class Vala.VAPIGen : Object {
{ "pkg", 0, 0, OptionArg.STRING_ARRAY, ref packages, "Include binding for PACKAGE", "PACKAGE..." },
{ "library", 0, 0, OptionArg.STRING, ref library, "Library name", "NAME" },
{ "directory", 'd', 0, OptionArg.FILENAME, ref directory, "Output directory", "DIRECTORY" },
+ { "disable-warnings", 0, 0, OptionArg.NONE, ref disable_warnings, "Disable warnings", null },
{ "version", 0, 0, OptionArg.NONE, ref version, "Display version number", null },
{ "quiet", 'q', 0, OptionArg.NONE, ref quiet_mode, "Do not print messages to the console", null },
{ "", 0, 0, OptionArg.FILENAME_ARRAY, ref sources, null, "FILE..." },
@@ -68,6 +70,8 @@ class Vala.VAPIGen : Object {
context.profile = Profile.GOBJECT;
context.vapi_directories = vapi_directories;
context.gir_directories = gir_directories;
+ context.report.enable_warnings = !disable_warnings;
+ context.report.set_verbose_errors (!quiet_mode);
CodeContext.push (context);
/* default package */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]