Skip to content
Permalink
Browse files

Add deprecation_warnings option

Controls treatment of warnings caused by attr_deprecated.

Can be one of the following values:

    * default: No special treatment.
    * error: Always treat as errors, regardless of the werror option.
    * no-error: Never treat as errors, regardless of the werror option.
    * ignore: Suppress the warnings.
  • Loading branch information...
Akaricchi committed Oct 3, 2019
1 parent 80dbd62 commit 69dc964c2261462f200db92c9597f0124ed465c6
Showing with 17 additions and 0 deletions.
  1. +10 −0 meson.build
  2. +7 −0 meson_options.txt
@@ -90,6 +90,16 @@ taisei_c_args = [
'-fno-trapping-math',
]

deprecation_warnings = get_option('deprecation_warnings')

if deprecation_warnings == 'error'
taisei_c_args += '-Werror=deprecated-declarations'
elif deprecation_warnings == 'no-error'
taisei_c_args += '-Wno-error=deprecated-declarations'
elif deprecation_warnings == 'ignore'
taisei_c_args += '-Wno-deprecated-declarations'
endif

if meson.version().version_compare('<0.50.0') and get_option('b_pch')
# Workaround for Meson bug: https://github.com/mesonbuild/meson/issues/4905
taisei_c_args += ['-fpch-deps']
@@ -183,3 +183,10 @@ option(
choices : ['auto', 'true', 'false'],
description : 'Use libcrypto from OpenSSL for better SHA implementations'
)

option(
'deprecation_warnings',
choices : ['default', 'error', 'no-error', 'ignore'],
type : 'combo',
description : 'Treatment of deprecation warnings'
)

0 comments on commit 69dc964

Please sign in to comment.
You can’t perform that action at this time.