From 097abf20b9063fd518f98779a7437d1ce1b509fc Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 23 Sep 2022 01:42:24 +0200 Subject: [PATCH] Stop disabling deprecation warnings when compiling wxGTK Don't use blanket warning suppression, as this suppresses even warnings about using our own deprecated API which is undesirable. --- build/cmake/functions.cmake | 4 ++-- configure | 2 +- configure.in | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/cmake/functions.cmake b/build/cmake/functions.cmake index 7182364e5e..5a67abe29a 100644 --- a/build/cmake/functions.cmake +++ b/build/cmake/functions.cmake @@ -129,8 +129,8 @@ function(wx_set_common_target_properties target_name) -Woverloaded-virtual ) - if(WXOSX_COCOA OR WXGTK3) - # when building using GTK+ 3 or Cocoa we currently get tons of deprecation + if(WXOSX_COCOA) + # when building using Cocoa we currently get tons of deprecation # warnings from the standard headers -- disable them as we already know # that they're deprecated but we still have to use them to support older # toolkit versions and leaving this warning enabled prevents seeing any diff --git a/configure b/configure index 49d2389e1d..d86fa7a187 100755 --- a/configure +++ b/configure @@ -42928,7 +42928,7 @@ esac CXXWARNINGS="$CXXWARNINGS -Wno-deprecated-declarations -Wno-narrowing -Wno-write-strings" fi - if test "$WXGTK4" != 1 -a \( "$WXGTK3" = 1 -o "$wxUSE_MAC" = 1 \) ; then + if test "$wxUSE_MAC" = 1 ; then CXXWARNINGS="$CXXWARNINGS -Wno-deprecated-declarations" OBJCXXFLAGS="$OBJCXXFLAGS -Wno-deprecated-declarations" diff --git a/configure.in b/configure.in index b22e74ccce..c9c035dc2c 100644 --- a/configure.in +++ b/configure.in @@ -8183,12 +8183,12 @@ elif test "$GXX" = yes ; then CXXWARNINGS="$CXXWARNINGS -Wno-deprecated-declarations -Wno-narrowing -Wno-write-strings" fi - dnl when building using GTK+ 3 or Cocoa we currently get tons of deprecation + dnl when building using Cocoa we currently get tons of deprecation dnl warnings from the standard headers -- disable them as we already know dnl that they're deprecated but we still have to use them to support older dnl toolkit versions and leaving this warning enabled prevents seeing any dnl other ones - if test "$WXGTK4" != 1 -a \( "$WXGTK3" = 1 -o "$wxUSE_MAC" = 1 \) ; then + if test "$wxUSE_MAC" = 1 ; then CXXWARNINGS="$CXXWARNINGS -Wno-deprecated-declarations" dnl CXXWARNINGS is not used for Objective-C++ code compilation, but we