diff options
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 125 |
1 files changed, 116 insertions, 9 deletions
diff --git a/meson.build b/meson.build index 8af5463c..3510d895 100644 --- a/meson.build +++ b/meson.build @@ -27,8 +27,118 @@ versioned_name = '@0@-@1@'.format(meson.project_name(), major_version) cpp = meson.get_compiler('cpp') # Set global warning suppressions -subdir('meson/suppressions') -add_project_arguments(cpp_suppressions, language: ['cpp']) +warning_level = get_option('warning_level') +cpp_suppressions = [] +if cpp.get_id() == 'clang' + if warning_level == 'everything' + cpp_suppressions = [ + '-Wno-c++17-extensions', + '-Wno-c++98-compat', + '-Wno-c++98-compat-pedantic', + '-Wno-cast-align', + '-Wno-cast-function-type-strict', + '-Wno-cast-qual', + '-Wno-documentation-unknown-command', + '-Wno-exit-time-destructors', + '-Wno-float-conversion', + '-Wno-float-equal', + '-Wno-format-nonliteral', + '-Wno-global-constructors', + '-Wno-implicit-float-conversion', + '-Wno-padded', + '-Wno-reserved-id-macro', + '-Wno-shorten-64-to-32', + '-Wno-sign-conversion', + '-Wno-switch-default', + '-Wno-switch-enum', + '-Wno-unreachable-code', + '-Wno-unsafe-buffer-usage', + '-Wno-vla', + '-Wno-weak-vtables', + ] + + if not meson.is_cross_build() + cpp_suppressions += [ + '-Wno-poison-system-directories', + ] + endif + + if host_machine.system() in ['darwin', 'freebsd'] + cpp_suppressions += [ + '-Wno-comma', # boost + '-Wno-deprecated-copy', # boost + '-Wno-disabled-macro-expansion', # boost + '-Wno-documentation', # JACK + '-Wno-documentation-deprecated-sync', # JACK + '-Wno-extra-semi-stmt', # boost + '-Wno-old-style-cast', # boost + '-Wno-redundant-parens', # boost + '-Wno-suggest-destructor-override', # boost + '-Wno-suggest-override', # boost + '-Wno-unused-template', # boost + '-Wno-zero-as-null-pointer-constant', # boost + ] + endif + endif + + if warning_level in ['everything', '3'] + cpp_suppressions += [ + '-Wno-unused-parameter', + '-Wno-vla-extension', + '-Wno-nullability-extension', + ] + endif + +elif cpp.get_id() == 'gcc' + if warning_level == 'everything' + cpp_suppressions = [ + '-Wno-abi-tag', + '-Wno-alloc-zero', + '-Wno-cast-align', + '-Wno-cast-qual', + '-Wno-conditionally-supported', + '-Wno-conversion', + '-Wno-effc++', + '-Wno-float-conversion', + '-Wno-float-equal', + '-Wno-format', + '-Wno-format-nonliteral', + '-Wno-format-truncation', + '-Wno-inline', + '-Wno-multiple-inheritance', + '-Wno-null-dereference', + '-Wno-old-style-cast', + '-Wno-padded', + '-Wno-redundant-tags', + '-Wno-sign-conversion', + '-Wno-stack-protector', + '-Wno-strict-overflow', + '-Wno-suggest-attribute=cold', + '-Wno-suggest-attribute=const', + '-Wno-suggest-attribute=format', + '-Wno-suggest-attribute=noreturn', + '-Wno-suggest-attribute=pure', + '-Wno-suggest-final-methods', + '-Wno-suggest-final-types', + '-Wno-suggest-override', + '-Wno-switch-default', + '-Wno-switch-enum', + '-Wno-unreachable-code', + '-Wno-unused-const-variable', + '-Wno-useless-cast', + ] + endif + + if warning_level in ['everything', '3'] + cpp_suppressions += ['-Wno-vla'] + endif + + if warning_level in ['everything', '3', '2'] + cpp_suppressions += ['-Wno-unused-parameter'] + endif +endif + +cpp_suppressions = cpp.get_supported_arguments(cpp_suppressions) ########################## # LV2 Path Configuration # @@ -108,45 +218,42 @@ thread_dep = dependency('threads') serd_dep = dependency( 'serd-0', - fallback: ['serd', 'serd_dep'], + include_type: 'system', version: '>= 0.30.4', ) sord_dep = dependency( 'sord-0', - fallback: ['sord', 'sord_dep'], include_type: 'system', version: '>= 0.16.15', ) sratom_dep = dependency( 'sratom-0', - fallback: ['sratom', 'sratom_dep'], + include_type: 'system', version: '>= 0.6.0', ) suil_dep = dependency( 'suil-0', - fallback: ['suil', 'suil_dep'], + include_type: 'system', version: '>= 0.10.0', ) lv2_dep = dependency( 'lv2', - fallback: ['lv2', 'lv2_dep'], include_type: 'system', version: '>= 1.18.0', ) lilv_dep = dependency( 'lilv-0', - fallback: ['lilv', 'lilv_dep'], + include_type: 'system', version: '>= 0.24.21', ) raul_dep = dependency( 'raul-2', - fallback: ['raul', 'raul_dep'], include_type: 'system', version: '>= 2.0.0', ) |