From: Seunghun Lee Date: Wed, 13 Jul 2022 06:39:36 +0000 (+0900) Subject: build: Set default warning_level=3 X-Git-Tag: accepted/tizen/unified/20220718.140337^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=187261b8152c80362ab7702dd58300e300513434;p=platform%2Fcore%2Fuifw%2Flibds.git build: Set default warning_level=3 This patch suppresses 'unused-parameter' and 'pedantic' GCC warnings that we don't care about. After suppressing these warnings, we can now enable the highest warning_level by default. Change-Id: I4402766a5cdabd6984582c17805c41c1f8a66645 --- diff --git a/meson.build b/meson.build index be7d520..03d6bc7 100644 --- a/meson.build +++ b/meson.build @@ -2,12 +2,26 @@ project('libds', 'c', license: 'MIT', version: '0.1.2', default_options: [ - 'warning_level=1', + 'warning_level=3', 'c_std=gnu99', 'buildtype=debug' ] ) +cc = meson.get_compiler('c') + +global_args = [] +global_args_maybe = [ + '-Wno-unused-parameter', + '-Wno-pedantic', +] +foreach a : global_args_maybe + if cc.has_argument(a) + global_args += a + endif +endforeach +add_global_arguments(global_args, language: 'c') + libds_version = meson.project_version() version_arr = libds_version.split('.') libds_version_major = version_arr[0] @@ -43,4 +57,4 @@ subdir('examples') subdir('clients') subdir('include') -configure_file(output: 'config.h', install: false, configuration: cdata) \ No newline at end of file +configure_file(output: 'config.h', install: false, configuration: cdata)