meson: Introduce -Ddeprecated-declarations=enabled build option
Per discussion in https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1940 we agreed that the number of deprecated warnings is cluttering significantly our build logs and making it hard for new contributors to spot new warnings that their code changes introduce. For now we decided that the default value for deprecated-declarations is DISABLED.
This commit is contained in:
parent
7363ca800e
commit
baf00809b7
2 changed files with 11 additions and 8 deletions
18
meson.build
18
meson.build
|
@ -71,14 +71,16 @@ config_h.set('USER_DIR_MODE', '0700',
|
|||
description: 'Permissions for creating the user\'s config, cache and data directories')
|
||||
|
||||
# compiler flags
|
||||
common_flags = [
|
||||
# We have so many deprecation warnings that it becomes impossible to notice any other useful
|
||||
# warning, thus making the compiler output completely useless. Ideally, we should fix all
|
||||
# of those but, until then, it's better to add this flag so that we avoid adding even more
|
||||
# warnings by accident. If you want to fix some of those, just comment the line below temporarely.
|
||||
'-Wno-deprecated-declarations',
|
||||
'-DHAVE_CONFIG_H'
|
||||
]
|
||||
common_flags = ['-DHAVE_CONFIG_H']
|
||||
|
||||
# We have so many deprecation warnings that it becomes impossible to notice any other useful
|
||||
# warning, thus making the compiler output completely useless. Ideally, we should fix all
|
||||
# of those but, until then, it's better to add this flag so that we avoid adding even more
|
||||
# warnings by accident. If you want to fix some of those, just build Settings with:
|
||||
# meson _build -Ddeprecated-declarions=enabled
|
||||
if get_option('deprecated-declarations').disabled()
|
||||
common_flags += '-Wno-deprecated-declarations'
|
||||
endif
|
||||
|
||||
# Only add this when optimizing is enabled (default)
|
||||
optimized_src = '''
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
option('deprecated-declarations', type: 'feature', value: 'disabled', description: 'build with deprecated declaration warnings')
|
||||
option('documentation', type: 'boolean', value: false, description: 'build documentation')
|
||||
option('ibus', type: 'boolean', value: true, description: 'build with IBus support')
|
||||
option('privileged_group', type: 'string', value: 'wheel', description: 'name of group that has elevated permissions')
|
||||
|
|
Loading…
Add table
Reference in a new issue