[gnome-settings-daemon] build: Fix checks



commit d952aacba4aa903b5fffd621bf2b0b2a08dd6c02
Author: Iñigo Martínez <inigomartinez gmail com>
Date:   Tue Feb 20 12:01:35 2018 +0100

    build: Fix checks
    
    Following meson guidelines[0], `G_DISABLE_CHECKS` has been removed
    from non debug builds. However, `G_DISABLE_CAST_CHECKS` has been
    added to release builds.
    
    Please see:
      !3
      https://bugzilla.gnome.org/show_bug.cgi?id=793512
    
    [0] https://wiki.gnome.org/Initiatives/GnomeGoals/MesonPorting

 meson.build | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/meson.build b/meson.build
index 4f627122..57fca540 100644
--- a/meson.build
+++ b/meson.build
@@ -30,6 +30,8 @@ gsd_schemadir = join_paths(gsd_datadir, 'glib-2.0', 'schemas')
 
 gsd_xdg_autostart = join_paths(gsd_sysconfdir, 'xdg', 'autostart')
 
+gsd_buildtype = get_option('buildtype')
+
 host_is_darwin = host_machine.system().contains('darwin')
 host_is_linux = host_machine.system().contains('linux')
 host_is_linux_not_s390 = host_is_linux and not host_machine.cpu().contains('s390')
@@ -52,8 +54,9 @@ endforeach
 
 # compiler flags
 common_flags = ['-DHAVE_CONFIG_H']
+compiler_flags = []
 
-if get_option('buildtype').contains('debug')
+if gsd_buildtype.contains('debug')
   common_flags += ['-DG_ENABLE_DEBUG']
 
   test_cflags = [
@@ -67,9 +70,8 @@ if get_option('buildtype').contains('debug')
   ]
 
   compiler_flags = cc.get_supported_arguments(test_cflags)
-else
-  common_flags += ['-DG_DISABLE_CHECKS']
-  compiler_flags = []
+elif gsd_buildtype.contains('release')
+  common_flags += ['-DG_DISABLE_CAST_CHECKS']
 endif
 
 # Workaround for meson's bug


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