summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-10-13 12:34:34 -0300
committerJames Almer <jamrial@gmail.com>2017-10-13 20:57:05 -0300
commitad56e8057d8af0201ed0cb65acc12e5889d4afcc (patch)
tree36b272d3e174ad0190326cd0c6662e490707bba7 /configure
parent458783315b8fb84e0a06346184b3cf62314c9e2e (diff)
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>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure7
1 files changed, 6 insertions, 1 deletions
diff --git a/configure b/configure
index 15f7e379d4..22026ef832 100755
--- a/configure
+++ b/configure
@@ -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