Commit c1725254 authored by Paolo Bacchilega's avatar Paolo Bacchilega
Browse files

meson: added option to disable deprecated declaration warnings

parent 5cab70f0
...@@ -303,6 +303,7 @@ config_inc = include_directories('.') ...@@ -303,6 +303,7 @@ config_inc = include_directories('.')
c_args = [] c_args = []
if get_option('buildtype').contains('debug') if get_option('buildtype').contains('debug')
warn_deprecated = get_option('warn-deprecated')
test_args = [ test_args = [
'-Wall', '-Wall',
'-Wcast-align', '-Wcast-align',
...@@ -317,9 +318,12 @@ if get_option('buildtype').contains('debug') ...@@ -317,9 +318,12 @@ if get_option('buildtype').contains('debug')
'-Wformat-security' '-Wformat-security'
] ]
else else
c_args += [ '-Wno-deprecated-declarations' ] warn_deprecated = false
test_args = [ '-Wall' ] test_args = [ '-Wall' ]
endif endif
if not(warn_deprecated)
test_args += [ '-Wno-deprecated-declarations' ]
endif
c_args += c_comp.get_supported_arguments(test_args) c_args += c_comp.get_supported_arguments(test_args)
# Subdirectories # Subdirectories
...@@ -340,6 +344,7 @@ summary = [ ...@@ -340,6 +344,7 @@ summary = [
' api: @0@'.format(api_version), ' api: @0@'.format(api_version),
' prefix: @0@'.format(prefix), ' prefix: @0@'.format(prefix),
' run in place: @0@'.format(get_option('run-in-place')), ' run in place: @0@'.format(get_option('run-in-place')),
' warn deprecated: @0@'.format(warn_deprecated),
' exiv2: @0@'.format(use_exiv2), ' exiv2: @0@'.format(use_exiv2),
' clutter: @0@'.format(use_clutter), ' clutter: @0@'.format(use_clutter),
' gstreamer: @0@'.format(use_gstreamer), ' gstreamer: @0@'.format(use_gstreamer),
......
option('warn-deprecated',
type : 'boolean',
value : true,
description : 'Enable deprecated declaration warnings in debug mode'
)
option('run-in-place', option('run-in-place',
type : 'boolean', type : 'boolean',
value : false, value : false,
......
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