From 4c1cf4aa67709693e932587d45e598bcb57cb1bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Thu, 28 Apr 2022 11:06:53 +0200 Subject: [PATCH] Sorted and removed duplicates from the compiler warning list The duplicates were '-Wreturn-std-move' and '-Wunreachable-code'. --- CMake/CatchMiscFunctions.cmake | 48 ++++++++++++++++------------------ 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/CMake/CatchMiscFunctions.cmake b/CMake/CatchMiscFunctions.cmake index fc3f0cb4..2bfbbe83 100644 --- a/CMake/CatchMiscFunctions.cmake +++ b/CMake/CatchMiscFunctions.cmake @@ -43,35 +43,33 @@ function(add_warnings_to_targets targets) if (NOT MSVC) set(CHECKED_WARNING_FLAGS - "-Wall" - "-Wextra" - "-Wpedantic" - "-Wweak-vtables" - "-Wunreachable-code" - "-Wmissing-declarations" - "-Wexit-time-destructors" - "-Wglobal-constructors" - "-Wmissing-noreturn" - "-Wparentheses" - "-Wextra-semi" - "-Wunreachable-code" - "-Wstrict-aliasing" - "-Wreturn-std-move" - "-Wmissing-braces" - "-Wdeprecated" - "-Wvla" - "-Wundef" - "-Wmisleading-indentation" - "-Wcatch-value" "-Wabsolute-value" - "-Wreturn-std-move" - "-Wunused-parameter" - "-Wunused-function" + "-Wall" "-Wcall-to-pure-virtual-from-ctor-dtor" + "-Wcatch-value" + "-Wdeprecated" "-Wdeprecated-register" - "-Wsuggest-override" - "-Wshadow" + "-Wexit-time-destructors" + "-Wextra" + "-Wextra-semi" + "-Wglobal-constructors" + "-Wmisleading-indentation" + "-Wmissing-braces" + "-Wmissing-declarations" + "-Wmissing-noreturn" "-Wold-style-cast" + "-Wparentheses" + "-Wpedantic" + "-Wreturn-std-move" + "-Wshadow" + "-Wstrict-aliasing" + "-Wsuggest-override" + "-Wundef" + "-Wunreachable-code" + "-Wunused-function" + "-Wunused-parameter" + "-Wvla" + "-Wweak-vtables" ) foreach(warning ${CHECKED_WARNING_FLAGS}) add_cxx_flag_if_supported_to_targets(${warning} "${targets}")