diff --git a/CMakeLists.txt b/CMakeLists.txt index 64882701ef918..09fc85a064f61 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}") diff --git a/Makefile b/Makefile index 663bcd98853ee..5de0d18afdd6a 100644 --- a/Makefile +++ b/Makefile @@ -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