Commit ad56e805 authored by James Almer's avatar James Almer

configure: force erroring out in check_disable_warning() if an option doesn't exists

Should prevent some options from being added to cflags when they
don't exist and the compiler only warns about it.
Reviewd-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent 45878331
......@@ -6370,9 +6370,14 @@ fi
check_disable_warning(){
warning_flag=-W${1#-Wno-}
test_cflags $warning_flag && add_cflags $1
test_cflags $unknown_warning_flags $warning_flag && add_cflags $1
}
test_cflags -Werror=unused-command-line-argument &&
append unknown_warning_flags "-Werror=unused-command-line-argument"
test_cflags -Werror=unknown-warning-option &&
append unknown_warning_flags "-Werror=unknown-warning-option"
check_disable_warning -Wno-parentheses
check_disable_warning -Wno-switch
check_disable_warning -Wno-format-zero-length
......
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