Skip to content

Commit

Permalink
Enable -Wsuggest-override (#36343)
Browse files Browse the repository at this point in the history
  • Loading branch information
Qrox authored and kevingranade committed Dec 22, 2019
1 parent 3cd2cc0 commit 46c0151
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ ELSE()
-Wold-style-cast \
-Woverloaded-virtual \
-Wpedantic")
IF(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
SET(CATA_WARNINGS "$(CATA_WARNINGS) -Wsuggest-override")
ENDIF(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# Compact the whitespace in the warning string
string(REGEX REPLACE "[\t ]+" " " CATA_WARNINGS "${CATA_WARNINGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CATA_WARNINGS}")
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ WARNINGS = \
-Wold-style-cast \
-Woverloaded-virtual \
-Wpedantic
ifndef CLANG
WARNINGS += -Wsuggest-override
endif
# Uncomment below to disable warnings
#WARNINGS = -w
DEBUGSYMS = -g
Expand Down

0 comments on commit 46c0151

Please sign in to comment.