Skip to content

Commit

Permalink
Move GCC only flags to check
Browse files Browse the repository at this point in the history
  • Loading branch information
dcvz committed Jul 8, 2022
1 parent 6faedf8 commit 563cd97
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions libultraship/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ WARN := -Wall -Wextra -Werror \
-Wno-unused-function \
-Wno-parentheses \
-Wno-narrowing \
-Wno-error=stringop-overflow \
-Wno-missing-field-initializers \
-Wno-error=multichar \
-Wno-unused-command-line-argument \
Expand All @@ -27,7 +26,14 @@ WARN := -Wall -Wextra -Werror \
-Wno-deprecated-declarations

CWARN :=
CXXWARN := -Wno-deprecated-enum-enum-conversion -Wno-error=maybe-uninitialized
CXXWARN := -Wno-deprecated-enum-enum-conversion

# Detect if CXX is clang++ or g++, in this order.
COMPILER_VERSION := $(shell $(CXX) --version)
ifneq '' '$(findstring g++,$(COMPILER_VERSION))'
WARN += -Wno-error=stringop-overflow
CXXWARN += -Wno-error=maybe-uninitialized
endif

CXXFLAGS := $(WARN) $(CXXWARN) -std=c++20 -D_GNU_SOURCE -DENABLE_OPENGL -DSPDLOG_ACTIVE_LEVEL=0
CFLAGS := $(WARN) $(CWARN) -std=c99 -D_GNU_SOURCE -DENABLE_OPENGL -DSPDLOG_ACTIVE_LEVEL=0
Expand Down

0 comments on commit 563cd97

Please sign in to comment.