From: Luca Bruno Date: Sun, 29 Aug 2010 08:57:24 +0000 (+0200) Subject: vapigen: Add --disable-warnings and use --quiet to tune reports verbosity X-Git-Tag: 0.11.2~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6879991b106948d0ea082aa9e471be33c86d9b92;p=thirdparty%2Fvala.git vapigen: Add --disable-warnings and use --quiet to tune reports verbosity --- diff --git a/vapigen/valavapigen.vala b/vapigen/valavapigen.vala index 58d3ffbc9..055765f5d 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 */