1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-03-23 04:24:35 +02:00

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: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit ad56e8057d8af0201ed0cb65acc12e5889d4afcc)
This commit is contained in:
James Almer 2017-10-13 12:34:34 -03:00
parent 7fb85ad360
commit 7deb7e6acd

7
configure vendored
View File

@ -6309,9 +6309,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