[gtk: 2/3] Meson: Only g-ir-scanner warnings fatal when buit with -Dwerror=true




commit 0fd790eb8db08d556c660bf83a4e7979d6819c46
Author: Xavier Claessens <xavier claessens collabora com>
Date:   Fri Jun 25 11:11:12 2021 -0400

    Meson: Only g-ir-scanner warnings fatal when buit with -Dwerror=true
    
    Also fix deprecation warning that requires using fatal_warnings kwarg
    from Meson 0.55.0.
    
    Fixes: #4072.

 gtk/meson.build | 6 +++++-
 meson.build     | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gtk/meson.build b/gtk/meson.build
index 7f892ffee8..9e2e04d798 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -1153,7 +1153,6 @@ if build_gir
   gir_args = [
     '-DGTK_COMPILATION',
     '--quiet',
-    '--warn-error',
   ]
 
   gdk_gir_inc = [ 'cairo-1.0', 'Gio-2.0', 'GdkPixbuf-2.0', 'Pango-1.0', 'PangoCairo-1.0' ]
@@ -1170,6 +1169,7 @@ if build_gir
     install: true,
     dependencies: libgdk_dep,
     extra_args: gir_args,
+    fatal_warnings: get_option('werror'),
   )
   gtk_dep_sources += gdk_gir
 
@@ -1186,6 +1186,7 @@ if build_gir
       dependencies: libgdk_dep,
       header: 'gdk/x11/gdkx.h',
       extra_args: gir_args,
+      fatal_warnings: get_option('werror'),
     )
     gtk_dep_sources += gdk_x11_gir
   endif
@@ -1203,6 +1204,7 @@ if build_gir
       dependencies: libgdk_dep,
       header: 'gdk/wayland/gdkwayland.h',
       extra_args: gir_args,
+      fatal_warnings: get_option('werror'),
     )
     gtk_dep_sources += gdk_wayland_gir
   endif
@@ -1221,6 +1223,7 @@ if build_gir
     install: true,
     dependencies: libgsk_dep,
     extra_args: gir_args,
+    fatal_warnings: get_option('werror'),
   )
   gtk_dep_sources += gsk_gir
 
@@ -1255,6 +1258,7 @@ if build_gir
     install: true,
     dependencies: [gtk_deps, libgsk_dep],
     extra_args: gir_args,
+    fatal_warnings: get_option('werror'),
   )
   gtk_dep_sources += gtk_gir
 endif
diff --git a/meson.build b/meson.build
index dc78358fa2..2071ec73f3 100644
--- a/meson.build
+++ b/meson.build
@@ -7,7 +7,7 @@ project('gtk', 'c',
           # https://github.com/mesonbuild/meson/issues/2289
           'c_std=gnu99',
         ],
-        meson_version : '>= 0.54',
+        meson_version : '>= 0.55',
         license: 'LGPLv2.1+')
 
 glib_req           = '>= 2.66.0'


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]