mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-25 04:11:44 +00:00
build system: check for and turn off some new warnings from clang++ 3.6
These warnings include -Winconsistent-missing-override and -Wpotentially-evaluated-expression which are both triggered by code out of my control (Qt and wxWidgets).
This commit is contained in:
parent
f3be86478f
commit
2fcc79b00c
1
Rakefile
1
Rakefile
@ -94,6 +94,7 @@ def setup_globals
|
||||
$po_multiple_sources = %{sv}
|
||||
|
||||
cflags_common = "-Wall -Wno-comment -Wfatal-errors #{c(:WLOGICAL_OP)} #{c(:WNO_MISMATCHED_TAGS)} #{c(:WNO_SELF_ASSIGN)} #{c(:QUNUSED_ARGUMENTS)}"
|
||||
cflags_common += " #{c(:WNO_INCONSISTENT_MISSING_OVERRIDE)} #{c(:WNO_POTENTIALLY_EVALUATED_EXPRESSION)}"
|
||||
cflags_common += " #{c(:OPTIMIZATION_CFLAGS)} -D_FILE_OFFSET_BITS=64 #{c(:MATROSKA_CFLAGS)} #{c(:EBML_CFLAGS)} #{c(:EXTRA_CFLAGS)} #{c(:DEBUG_CFLAGS)} #{c(:PROFILING_CFLAGS)} #{c(:USER_CPPFLAGS)}"
|
||||
cflags_common += " -DMTX_LOCALE_DIR=\\\"#{c(:localedir)}\\\" -DMTX_PKG_DATA_DIR=\\\"#{c(:pkgdatadir)}\\\" -DMTX_DOC_DIR=\\\"#{c(:docdir)}\\\""
|
||||
cflags_common += " -mno-ms-bitfields -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 " if c?(:MINGW)
|
||||
|
@ -8,6 +8,18 @@ if test x"$ac_cv_compiler_is_clang" = xyes; then
|
||||
WNO_SELF_ASSIGN="-Wno-self-assign"
|
||||
WNO_MISMATCHED_TAGS="-Wno-mismatched-tags"
|
||||
|
||||
ac_save_CXXFLAGS="$CXXFLAGS"
|
||||
AC_LANG_PUSH(C++)
|
||||
|
||||
CXXFLAGS="$ac_save_CXXFLAGS -Werror -Wno-inconsistent-missing-override"
|
||||
AC_TRY_COMPILE([],[],[ WNO_INCONSISTENT_MISSING_OVERRIDE="-Wno-inconsistent-missing-override" ],[])
|
||||
|
||||
CXXFLAGS="$ac_save_CXXFLAGS -Werror -Wno-potentially-evaluated-expression"
|
||||
AC_TRY_COMPILE([],[],[ WNO_POTENTIALLY_EVALUATED_EXPRESSION="-Wno-potentially-evaluated-expression" ],[])
|
||||
|
||||
AC_LANG_POP()
|
||||
CXXFLAGS="$ac_save_CXXFLAGS"
|
||||
|
||||
elif check_version 4.8.0 $ac_cv_gcc_version ; then
|
||||
WLOGICAL_OP="-Wlogical-op"
|
||||
fi
|
||||
@ -16,3 +28,5 @@ AC_SUBST(QUNUSED_ARGUMENTS)
|
||||
AC_SUBST(WNO_SELF_ASSIGN)
|
||||
AC_SUBST(WNO_MISMATCHED_TAGS)
|
||||
AC_SUBST(WLOGICAL_OP)
|
||||
AC_SUBST(WNO_INCONSISTENT_MISSING_OVERRIDE)
|
||||
AC_SUBST(WNO_POTENTIALLY_EVALUATED_EXPRESSION)
|
||||
|
@ -120,7 +120,9 @@ USER_CFLAGS = @USER_CFLAGS@
|
||||
USER_LDFLAGS = @USER_LDFLAGS@
|
||||
VORBIS_LIBS = @VORBIS_LIBS@
|
||||
WLOGICAL_OP = @WLOGICAL_OP@
|
||||
WNO_INCONSISTENT_MISSING_OVERRIDE = @WNO_INCONSISTENT_MISSING_OVERRIDE@
|
||||
WNO_MISMATCHED_TAGS = @WNO_MISMATCHED_TAGS@
|
||||
WNO_POTENTIALLY_EVALUATED_EXPRESSION = @WNO_POTENTIALLY_EVALUATED_EXPRESSION@
|
||||
WNO_SELF_ASSIGN = @WNO_SELF_ASSIGN@
|
||||
WXWIDGETS_CFLAGS = @WXWIDGETS_CFLAGS@
|
||||
WXWIDGETS_INCLUDES = @WXWIDGETS_INCLUDES@
|
||||
|
Loading…
Reference in New Issue
Block a user