diff options
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/meson.build b/meson.build index 824bc304..b920a380 100644 --- a/meson.build +++ b/meson.build @@ -20,8 +20,27 @@ soversion = '0' host_system = host_machine.system() +# Enable extra warnings if compiler supports them. if cc.get_id() == 'msvc' add_project_arguments('/FImsvc_recommended_pragmas.h', language : 'c') +else + foreach arg : [ + '-Wall', + '-Wmissing-include-dirs', + '-Wpointer-arith', + '-Winit-self', + '-Wdeclaration-after-statement', + '-Werror=missing-prototypes', + '-Werror=implicit-function-declaration', + '-Werror=aggregate-return', + '-Werror=format=2', + '-Wstrict-prototypes', + '-Wno-format-zero-length', + ] + if cc.has_argument(arg) + add_project_arguments(arg, language : 'c') + endif + endforeach endif glib_dep = [dependency('glib-2.0', version : '>=2.38'), @@ -58,25 +77,6 @@ if host_machine.system() == 'windows' cdata.set('DLL_EXPORT', 1) endif -# Enable extra warnings if compiler supports them. -foreach arg : [ - '-Wall', - '-Wmissing-include-dirs', - '-Wpointer-arith', - '-Winit-self', - '-Wdeclaration-after-statement', - '-Werror=missing-prototypes', - '-Werror=implicit-function-declaration', - '-Werror=aggregate-return', - '-Werror=format=2', - '-Wstrict-prototypes', - '-Wno-format-zero-length', - ] - if cc.has_argument(arg) - add_project_arguments(arg, language : 'c') - endif -endforeach - ################### # GIO TLS support # ################### |