Skip to content

Commit

Permalink
Disable irrelevant Clang warnings
Browse files Browse the repository at this point in the history
* We don't need warnings about self-assignment when testing that
self-assignment works.
* The GCC-compatible method of PCH inclusion triggers a -Wdeprecated
warning, which isn't helpful. Turning it off.
  • Loading branch information
mattkretz committed Nov 1, 2023
1 parent ab30c5e commit 927bd87
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ triplet := $(shell $(CXX) -dumpmachine)
CXXFLAGS+=-Wno-attributes -Wno-unknown-pragmas -Wno-psabi
ifneq ($(findstring GCC,$(shell $(CXX) --version)),)
CXXFLAGS+=-static-libstdc++
else ifneq ($(findstring clang,$(shell $(CXX) --version)),)
# Avoid warning on self-assignment tests
CXXFLAGS+=-Wno-self-assign-overloaded
# Avoid warning about PCH inclusion method
CXXFLAGS+=-Wno-deprecated
endif
CXXFLAGS+=-I$(PWD)
prefix=/usr/local
Expand All @@ -25,7 +30,6 @@ ifneq ($(findstring 86,$(triplet)),)
testflags=-march=native
else ifneq ($(findstring wasm,$(triplet)),)
testflags=
CXXFLAGS+=-Wno-deprecated
endif

std=$(shell ./latest_std_flag.sh)
Expand Down

0 comments on commit 927bd87

Please sign in to comment.