Commit 2a84c691 authored by Christian Persch's avatar Christian Persch

build: Fix format warnings test

parent c4e3b72f
......@@ -194,19 +194,26 @@ foreach flag: compiler_flags_cc_required
assert(cc.has_argument(flag), flag + ' is required but not supported')
endforeach
# Meson problem: GCC only accepts the latter 2 options of the 3 below
# if the first is *also* passed, which doesn't work with get_supported_arguments()
# above. So just add these unconditionally, since all compilers we support
# accept these flags.
# FIXME: these flags break the gtkdoc-scangobj run
# compiler_flags_format_warnings = [
# '-Werror=format=2',
# '-Werror=format-nonliteral',
# '-Werror=format-security',
#]
#
# global_cflags += compiler_flags_format_warnings
# These flags have to be tested together
compiler_flags_common_multi = [
# FIXME: these flags break the gtkdoc-scangobj run
## These only work together with -Wformat
#[
# '-Werror=format=2',
# '-Werror=format-nonliteral',
# '-Werror=format-security',
#],
]
foreach flags : compiler_flags_common_multi
if cc.has_multi_arguments(flags)
global_cflags += flags
endif
if cxx.has_multi_arguments(flags)
global_cxxflags += flags
endif
endforeach
# ... and now make these flags the default
......
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