Skip to content
Snippets Groups Projects
Commit bb9b5918 authored by George Kiagiadakis's avatar George Kiagiadakis
Browse files

meson: enable compiler flags for warnings, if supported

Use the same set of warning flags that pipewire uses

See #20
parent e0e2e392
No related branches found
No related tags found
No related merge requests found
......@@ -47,15 +47,29 @@ build_gir = gir.found()
wp_lib_include_dir = include_directories('lib')
common_flags = [
'-fvisibility=hidden',
'-Wsuggest-attribute=format',
'-Wsign-compare',
'-Wpointer-arith',
'-Wpointer-sign',
'-Wformat',
'-Wformat-security',
'-Wimplicit-fallthrough',
'-Wmissing-braces',
'-Wtype-limits',
'-Wvariadic-macros',
'-Wno-missing-field-initializers',
'-Wno-unused-parameter',
'-Wno-pedantic',
'-Wold-style-declaration',
'-Wunused-result',
]
cc = meson.get_compiler('c')
if cc.has_argument('-fvisibility=hidden')
add_project_arguments('-fvisibility=hidden', language: 'c')
endif
add_project_arguments(cc.get_supported_arguments(common_flags), language: 'c')
ccpp = meson.get_compiler('cpp')
if ccpp.has_argument('-fvisibility=hidden')
add_project_arguments('-fvisibility=hidden', language: 'cpp')
endif
add_project_arguments(ccpp.get_supported_arguments(common_flags), language: 'cpp')
have_audiofade = cc.compiles('''
#include <spa/utils/names.h>
......
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