From 44f0d7ee21c34fb90a866c0571e7936ffadebf49 Mon Sep 17 00:00:00 2001 From: medithe Date: Tue, 18 Aug 2020 23:04:51 +0200 Subject: [PATCH] CMakeLists.txt: Added -Wunused flag to clang and gcc. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 881b2b22..5cbf57d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,7 +104,7 @@ message(STATUS "Required features: ${FMT_REQUIRED_FEATURES}") if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") set(PEDANTIC_COMPILE_FLAGS -pedantic-errors -Wall -Wextra -pedantic - -Wold-style-cast -Wundef + -Wold-style-cast -Wundef -Wunused -Wredundant-decls -Wwrite-strings -Wpointer-arith -Wcast-qual -Wformat=2 -Wmissing-include-dirs -Wcast-align @@ -130,7 +130,7 @@ endif () if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") set(PEDANTIC_COMPILE_FLAGS -Wall -Wextra -pedantic -Wconversion -Wundef - -Wdeprecated -Wweak-vtables) + -Wunused -Wdeprecated -Wweak-vtables) check_cxx_compiler_flag(-Wzero-as-null-pointer-constant HAS_NULLPTR_WARNING) if (HAS_NULLPTR_WARNING) set(PEDANTIC_COMPILE_FLAGS ${PEDANTIC_COMPILE_FLAGS}