commit ec307e2ac7ca5646ee53ea559fccbe28dff5a3b0
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Wed Jun 11 23:15:21 2025 +0200

    Only disable -Wdeprecated with Qt < 5.13
---
 config/lyxinclude.m4 | 8 +-------
 config/qt.m4         | 9 +++++++++
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4
index 23f8d7587f..290e47affe 100644
--- a/config/lyxinclude.m4
+++ b/config/lyxinclude.m4
@@ -334,13 +334,7 @@ if test x$GXX = xyes; then
   dnl Warnings are for preprocessor too
   if test x$enable_warnings = xyes ; then
       AM_CPPFLAGS="$AM_CPPFLAGS -Wall -Wextra"
-      dnl Shut off warning -Wdeprecated-copy, which triggers too much
-      dnl note that g++ always accepts -Wno-xxx, even when -Wxxx is an error.
-      AC_LANG_PUSH(C++)
-      AX_CHECK_COMPILE_FLAG([-Wdeprecated-copy],
-       [AM_CXXFLAGS="$AM_CXXFLAGS -Wno-deprecated-copy"], [], [-Werror])
-      AC_LANG_POP(C++)
-    fi
+  fi
   if test x$enable_stdlib_debug = xyes ; then
     dnl FIXME: for clang/libc++, one should define _LIBCPP_DEBUG2=0
     dnl See 
http://clang-developers.42468.n3.nabble.com/libc-debug-mode-td3336742.html
diff --git a/config/qt.m4 b/config/qt.m4
index 59ca971996..3c862d85b3 100644
--- a/config/qt.m4
+++ b/config/qt.m4
@@ -210,6 +210,15 @@ AC_DEFUN([QT_DO_IT_ALL],
        [AC_MSG_ERROR([LyX requires at least version $1 of Qt. Only version 
$QTLIB_VERSION has been found.])
        ])
 
+       AS_VERSION_COMPARE($QTLIB_VERSION, [5.13],[
+         dnl Shut off warning -Wdeprecated-copy, which triggers too much
+         dnl note that g++ always accepts -Wno-xxx, even when -Wxxx is an 
error.
+         AC_LANG_PUSH(C++)
+         AX_CHECK_COMPILE_FLAG([-Wdeprecated-copy],
+           [AM_CXXFLAGS="$AM_CXXFLAGS -Wno-deprecated-copy"], [], [-Werror])
+         AC_LANG_POP(C++)])
+
+
        case $QTLIB_VERSION in
        6.*) if test $enable_stdlib_debug = "yes" ; then
                    LYX_WARNING([Compiling LyX with stdlib-debug and Qt6 
library may lead to
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to