Commit 8103ec5d authored by Sam Thursfield's avatar Sam Thursfield
Browse files

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
parent 42a5efd6
......@@ -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
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',
# in 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
# stuff dates from 2005 in commit 8a76a0a72abad7ae24b895910d93791b90dfe005.
warning_flags += ['-Wuninitialized']
foreach option : warning_flags
add_global_arguments(option, language: 'c')
# In 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.
use_no_strict_aliasing = cc.has_argument('-fno-strict-aliasing')
datadir = get_option('prefix') / get_option('datadir')
......@@ -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,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment