]> granicus.if.org Git - nethack/commitdiff
add -Wdeprecated-copy if clang and clang >= 9
authornhmall <nhmall@nethack.org>
Fri, 5 Feb 2021 21:28:09 +0000 (16:28 -0500)
committernhmall <nhmall@nethack.org>
Fri, 5 Feb 2021 21:28:09 +0000 (16:28 -0500)
sys/unix/hints/include/compiler.2020

index 3d3de85447eba23b9b183a0c658904bd8a88a103..4ba1e9b319ccaddc036f0d5d1342871aa9281744 100755 (executable)
@@ -69,10 +69,21 @@ endif  #gcc version greater than or equal to 9
 GPPGTEQ9 := $(shell expr `$(CXX) -dumpversion | cut -f1 -d.` \>= 9)
 ifeq "$(GPPGTEQ9)" "1"
 CCXXFLAGS+=-Wformat-overflow
-endif  #g++ version greater than or equal to 9
+ifdef WANT_WIN_QT
+CCXXFLAGS+=-Wno-deprecated-copy
+endif  # WANT_WIN_QT
+endif  # g++ version greater than or equal to 9
 # end of gcc-specific
 
 else   # clang-specific follows
+# get the version of clang++
+CLANGPPGTEQ9 := $(shell expr `$(CXX) -dumpversion | cut -f1 -d.` \>= 9)
+ifeq "$(CLANGPPGTEQ9)" "1"
+ifdef WANT_WIN_QT
+CCXXFLAGS+=-Wno-deprecated-copy
+endif  # WANT_WIN_QT
+endif  #clang++ greater than or equal to 9
+
 ifdef WANT_WIN_QT
 CCXXFLAGS+=-Wno-deprecated-declarations
 endif  # WANT_WIN_QT