[rhythmbox/wip/sam/meson] meson: Remove more_warnings option
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox/wip/sam/meson] meson: Remove more_warnings option
- Date: Thu, 29 Oct 2020 18:26:53 +0000 (UTC)
commit 8103ec5db4bc0cb971c80f3abacba26e9156d70c
Author: Sam Thursfield <sam afuera me uk>
Date: Thu Oct 29 19:25:57 2020 +0100
meson: Remove more_warnings option
Meson warning_level option is a fine replacement. Use ...
-Dwarning_level=1 for -Wall
-Dwarning_level=2 for -Wextra
-Dwarning_level=3 for -Wextra -Wpedantic
meson.build | 33 ---------------------------------
meson_options.txt | 2 --
2 files changed, 35 deletions(-)
---
diff --git a/meson.build b/meson.build
index 3f81e0107..eb641e366 100644
--- a/meson.build
+++ b/meson.build
@@ -206,39 +206,6 @@ cdata.set('METADATA_UNINSTALLED_DIR', '"@0@"'.format(meson.current_build_dir() +
# shared libraries.
add_global_arguments('-fPIC', language: 'c')
-set_more_warnings = false
-if get_option('more_warnings') == 'yes'
- set_more_warnings = true
-elif get_option('more_warnings') == 'auto'
- if run_command('[', '-d', '.git', ']').returncode() == 0
- set_more_warnings = true
- endif
-endif
-
-if set_more_warnings == true and cc.get_id() == 'gcc'
- warning_flags = [
- '-Wcomment', '-Wformat', '-Wnonnull', '-Wimplicit-int', '-Wimplicit',
- '-Wmain', '-Wmissing-braces', '-Wparentheses', '-Wsequence-point',
- '-Wreturn-type', '-Wswitch', '-Wtrigraphs', '-Wunused-function',
- '-Wunused-label', '-Wunused-value', '-Wchar-subscripts',
- '-Wmissing-declarations', '-Wmissing-prototypes', '-Wnested-externs',
- '-Wpointer-arith', '-Wcast-align', '-Wformat-security', '-Wall',
- '-Wno-deprecated-declarations']
-
- # in configure.ac this option is only added if '-O0' is not present in the CFLAGS
- # I'm not sure how to do it in Meson and not sure if it matters; the configure.ac
- # stuff dates from 2005 in commit 8a76a0a72abad7ae24b895910d93791b90dfe005.
- warning_flags += ['-Wuninitialized']
-
- foreach option : warning_flags
- add_global_arguments(option, language: 'c')
- # In configure.ac we would check if each compiler argument was actually
- # supported by the compiler. That's quite slow and here we just assume
- # they all are. If this causes problems, `if cc.has_argument(option)` is
- # the way to implement such a check here.
- endforeach
-endif
-
use_no_strict_aliasing = cc.has_argument('-fno-strict-aliasing')
datadir = get_option('prefix') / get_option('datadir')
diff --git a/meson_options.txt b/meson_options.txt
index 7034c35a0..55cb584c3 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -31,8 +31,6 @@ option('plugins_vala', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'au
option('database', type: 'combo', choices: ['tree'], value: 'tree',
description: 'Select the database to use (default tree)')
-option('more_warnings', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
- description: 'Maximum compiler warnings')
option('rhythmdb_debug', type: 'combo', choices: ['0', '1', '2'], value: '0',
description: 'Level of RhythmDB sanity checking')
option('uninstalled_build', type: 'boolean', value: false,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]