meson: Raise default warning level.

Increases the default warning level to 3, which includes pedantic
errors. Disable them on C++, which is the way it was done before.

To resolve most pedantic warnings on C++ either the compiler standard
would need to be increased to c++2a or the remaining copositor backends
would require porting to plain C. One of each or both should happen in
the future.
This commit is contained in:
Lubosz Sarnecki 2020-03-31 18:03:45 +02:00
parent a81b7e1751
commit 79b739d51a

View file

@ -9,7 +9,7 @@ project(
meson_version: '>=0.49.0',
default_options: [
'c_std=c11',
'warning_level=2',
'warning_level=3',
],
)
@ -18,12 +18,12 @@ cpp = meson.get_compiler('cpp')
add_project_arguments(cc.get_supported_arguments([
'-D_XOPEN_SOURCE=700',
'-pedantic',
'-Wno-unused-parameter',
]), language: 'c')
add_project_arguments(cpp.get_supported_arguments([
'-D_XOPEN_SOURCE=700',
'-Wno-pedantic',
'-Wno-unused-parameter',
'-Wno-deprecated-copy', # Eigen
]), language: 'cpp')