Skip to content
Snippets Groups Projects
Commit 21414e19 authored by Gaël Bonithon's avatar Gaël Bonithon
Browse files

meson-build: Update debug/optimization flag management

Related: xfce4-dev-tools!145
parent 6df744bc
No related branches found
No related tags found
No related merge requests found
Pipeline #34527 passed
......@@ -4,7 +4,7 @@ project(
version : '4.20.0-dev',
license : 'GPL-2',
meson_version : '>= 0.54.0',
default_options : ['c_std=gnu11', 'buildtype=debugoptimized', 'warning_level=2', 'b_ndebug=if-release']
default_options : ['c_std=gnu11', 'buildtype=debugoptimized', 'warning_level=2']
)
libxfce4util_soversion = '7.0.0'
libxfce4util_soversion_major = libxfce4util_soversion.split('.')[0]
......@@ -124,18 +124,15 @@ extra_cflags_check = [
'-Wno-error=deprecated-declarations',
]
buildtype = get_option('buildtype')
if buildtype == 'debug' or buildtype == 'debugoptimized'
optimization = get_option('optimization')
if get_option('debug') and optimization in ['0', 'g']
extra_cflags_check += '-fstack-protector-strong'
extra_cflags += '-DDEBUG=1'
if buildtype == 'debug'
extra_cflags += [
'-DG_ENABLE_DEBUG',
'-DDEBUG_TRACE=1',
]
endif
elif buildtype == 'minsize'
extra_cflags += [
'-DDEBUG=1',
'-DDEBUG_TRACE=1',
'-DG_ENABLE_DEBUG',
]
elif optimization in ['3', 'minsize']
extra_cflags += [
'-DNDEBUG',
'-DG_DISABLE_CAST_CHECKS',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment