summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIñigo Martínez <inigomartinez@gmail.com>2018-02-20 12:01:35 +0100
committerIñigo Martínez <inigomartinez@gmail.com>2018-03-02 22:13:26 +0100
commitd952aacba4aa903b5fffd621bf2b0b2a08dd6c02 (patch)
treebb57378056700cd1aa8025ba78dced768ed5c282
parentc42b68bb39181157749cdb9c894920a7433aeb39 (diff)
downloadgnome-settings-daemon-d952aacba4aa903b5fffd621bf2b0b2a08dd6c02.tar.gz
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
-rw-r--r--meson.build10
1 files 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