[tracker-miners/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-miners/sam/meson-debug-flags] build: Use specific Meson options to enable debug flags
- Date: Mon, 21 Sep 2020 14:38:52 +0000 (UTC)
commit 77686ca4dd5d42c4849c18c67b8651e6ca50e01d
Author: Sam Thursfield <sam afuera me uk>
Date: Mon Sep 21 16:38:04 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.
See also: https://gitlab.gnome.org/GNOME/tracker/-/merge_requests/316
meson.build | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/meson.build b/meson.build
index 66197aa88..0f71e1654 100644
--- a/meson.build
+++ b/meson.build
@@ -121,13 +121,14 @@ add_project_arguments('-DG_LOG_DOMAIN="Tracker"', language: 'c')
add_project_arguments('-DG_LOG_STRUCTURED=1', language: 'c')
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]