Commit ceae7339 authored by Sam Thursfield's avatar Sam Thursfield
Browse files

build: Use specific Meson options to enable debug flags

Based on gtk@eaef24c5

Note that TRACKER_DEBUG is disabled in most distro builds as they
pass `--buildtype=plain`. I recommend distros add `-DG_ENABLE_DEBUG`
to Tracker Miners' CFLAGS as the overhead is minimal and it helps users
to provide useful bug reports.

See also: tracker!316
parent 1b78faca
Pipeline #215727 passed with stage
in 4 minutes and 40 seconds
......@@ -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']
elif buildtype == 'release'
elif optimization in ['2', '3', 's']
debug_cflags += '-DG_DISABLE_CAST_CHECKS'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment