[tracker/sam/meson-debug-flags] build: Use specific Meson options to enable debug flags
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/sam/meson-debug-flags] build: Use specific Meson options to enable debug flags
- Date: Mon, 21 Sep 2020 14:35:36 +0000 (UTC)
commit ad7ff12921e3dbc1fca6a49a815e46d006ee94fc
Author: Sam Thursfield <sam afuera me uk>
Date: Mon Sep 21 16:33:38 2020 +0200
build: Use specific Meson options to enable debug flags
Based on https://gitlab.gnome.org/GNOME/gtk/-/commit/eaef24c527833232bd4725789b0f35304de8123b
This should cause TRACKER_DEBUG to be enabled in distro builds.
In current Fedora 33 packages, it's disabled.
meson.build | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/meson.build b/meson.build
index 75ccc5f4f..274be7c10 100644
--- a/meson.build
+++ b/meson.build
@@ -75,13 +75,14 @@ add_project_arguments(['-D', 'TRACKER_COMPILATION'],
language: 'vala')
debug_cflags = []
-buildtype = get_option('buildtype')
-if buildtype.startswith('debug')
+debug = get_option('debug')
+optimization = get_option('optimization')
+if debug
debug_cflags += '-DG_ENABLE_DEBUG'
- if buildtype == 'debug'
+ if optimization in ['0', 'g']
debug_cflags += '-DG_ENABLE_CONSISTENCY_CHECKS'
endif
-elif buildtype == 'release'
+elif optimization in ['2', '3', 's']
debug_cflags += '-DG_DISABLE_CAST_CHECKS'
endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]