mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-02-26 08:22:31 +00:00
build system: avoid certain warnings with Qt and clang
This commit is contained in:
parent
1c2a47eae6
commit
94b2632a1f
1
Rakefile
1
Rakefile
@ -89,6 +89,7 @@ def setup_globals
|
||||
$build_tools ||= c?(:TOOLS)
|
||||
|
||||
cflags_common = "-Wall -Wno-comment -Wfatal-errors "
|
||||
cflags_common += "#{c(:WNO_SELF_ASSIGN)} " if c?(:USE_CLANG) && c?(:USE_QT)
|
||||
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 += "-DPACKAGE=\\\"#{c(:PACKAGE)}\\\" -DVERSION=\\\"#{c(:VERSION)}\\\" -DMTX_LOCALE_DIR=\\\"#{c(:localedir)}\\\" -DMTX_PKG_DATA_DIR=\\\"#{c(:pkgdatadir)}\\\" -DMTX_DOC_DIR=\\\"#{c(:docdir)}\\\" "
|
||||
cflags_common += "#{c(:QUNUSED_ARGUMENTS)}"
|
||||
|
30
ac/clang.m4
30
ac/clang.m4
@ -1,7 +1,8 @@
|
||||
AC_DEFUN([AX_COMPILER_IS_CLANG],[
|
||||
AC_CACHE_CHECK([compiler is clang], [ac_cv_compiler_is_clang], [
|
||||
if $CXX --version | grep -q -i 'clang.*llvm' ; then
|
||||
if $CXX --version | grep -q -i clang ; then
|
||||
ac_cv_compiler_is_clang=yes
|
||||
USE_CLANG=yes
|
||||
else
|
||||
ac_cv_compiler_is_clang=no
|
||||
fi
|
||||
@ -33,5 +34,32 @@ AC_DEFUN([AX_QUNUSED_ARGUMENTS_FLAG],[
|
||||
AC_SUBST(QUNUSED_ARGUMENTS)
|
||||
])
|
||||
|
||||
AC_DEFUN([AX_WNO_SELF_ASSIGN_FLAG],[
|
||||
AC_CACHE_CHECK([for the compiler flag "-Wno-self-assign"], [ax_cv_wno_self_assign_flag],[
|
||||
|
||||
CXXFLAGS_SAVED=$CXXFLAGS
|
||||
CXXFLAGS="$CXXFLAGS -Wno-self-assign"
|
||||
export CXXFLAGS
|
||||
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_TRY_COMPILE(
|
||||
[],
|
||||
[1;],
|
||||
[ax_cv_wno_self_assign_flag="yes"],
|
||||
[ax_cv_wno_self_assign_flag="no"])
|
||||
AC_LANG_POP
|
||||
|
||||
CXXFLAGS="$CXXFLAGS_SAVED"
|
||||
])
|
||||
|
||||
WNO_SELF_ASSIGN=""
|
||||
if test x"$ax_cv_wno_self_assign_flag" = xyes ; then
|
||||
WNO_SELF_ASSIGN="-Wno-self-assign"
|
||||
fi
|
||||
AC_SUBST(WNO_SELF_ASSIGN)
|
||||
])
|
||||
|
||||
AX_QUNUSED_ARGUMENTS_FLAG
|
||||
AX_WNO_SELF_ASSIGN_FLAG
|
||||
AX_COMPILER_IS_CLANG
|
||||
AC_SUBST(USE_CLANG)
|
||||
|
@ -104,12 +104,14 @@ QT_CFLAGS = @QT_CFLAGS@
|
||||
QT_LIBS = @QT_LIBS@
|
||||
QUNUSED_ARGUMENTS = @QUNUSED_ARGUMENTS@
|
||||
STD_CXX0X = @STD_CXX0X@
|
||||
USE_CLANG = @USE_CLANG@
|
||||
USE_PRECOMPILED_HEADERS = @USE_PRECOMPILED_HEADERS@
|
||||
USER_CPPFLAGS = @USER_CPPFLAGS@
|
||||
USER_CXXFLAGS = @USER_CXXFLAGS@
|
||||
USER_CFLAGS = @USER_CFLAGS@
|
||||
USER_LDFLAGS = @USER_LDFLAGS@
|
||||
VORBIS_LIBS = @VORBIS_LIBS@
|
||||
WNO_SELF_ASSIGN = @WNO_SELF_ASSIGN@
|
||||
WXWIDGETS_CFLAGS = @WXWIDGETS_CFLAGS@
|
||||
WXWIDGETS_INCLUDES = @WXWIDGETS_INCLUDES@
|
||||
WXWIDGETS_LIBS = @WXWIDGETS_LIBS@
|
||||
|
Loading…
Reference in New Issue
Block a user