]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vapigen: Add --disable-warnings and use --quiet to tune reports verbosity
authorLuca Bruno <lucabru@src.gnome.org>
Sun, 29 Aug 2010 08:57:24 +0000 (10:57 +0200)
committerEvan Nemerson <evan@coeus-group.com>
Mon, 8 Nov 2010 09:43:18 +0000 (01:43 -0800)
vapigen/valavapigen.vala

index 58d3ffbc9393e18319091b86633c4f8efd83e6ac..055765f5d0c6d19e018a9655ccf95e54bd18f0d4 100644 (file)
@@ -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 */