diff options
| author | Martin Hořeňovský | 2022-05-01 23:15:24 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2022-05-03 13:54:00 +0200 |
| commit | 722c1978554f5521ce301e26040defd1940dace6 (patch) | |
| tree | 8d64c094f89f84c3e38c062cce44db4ca2792ea2 | |
| parent | 198808a24e252bf049df24c2f3d4b4d69c892a39 (diff) | |
| download | catch3-722c1978554f5521ce301e26040defd1940dace6.tar.gz | |
Enable a bunch of extra warnings
| -rw-r--r-- | CMake/CatchMiscFunctions.cmake | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/CMake/CatchMiscFunctions.cmake b/CMake/CatchMiscFunctions.cmake index 9db8af8e..a4f5e9a8 100644 --- a/CMake/CatchMiscFunctions.cmake +++ b/CMake/CatchMiscFunctions.cmake @@ -48,17 +48,25 @@ function(add_warnings_to_targets targets) "-Wcall-to-pure-virtual-from-ctor-dtor" "-Wcast-align" "-Wcatch-value" + "-Wdangling" "-Wdeprecated" "-Wdeprecated-register" + "-Wexceptions" "-Wexit-time-destructors" "-Wextra" "-Wextra-semi" "-Wglobal-constructors" + "-Winit-self" "-Wmisleading-indentation" + "-Wmismatched-new-delete" + "-Wmismatched-return-types" + "-Wmismatched-tags" "-Wmissing-braces" "-Wmissing-declarations" "-Wmissing-noreturn" + "-Wnull-dereference" "-Wold-style-cast" + "-Woverloaded-virtual" "-Wparentheses" "-Wpedantic" "-Wreorder" @@ -67,12 +75,21 @@ function(add_warnings_to_targets targets) "-Wstrict-aliasing" "-Wsuggest-override" "-Wundef" + "-Wuninitialized" + "-Wunneeded-internal-declaration" "-Wunreachable-code" "-Wunused" "-Wunused-function" "-Wunused-parameter" "-Wvla" "-Wweak-vtables" + + # This is a useful warning, but our tests sometimes rely on + # functions being present, but not picked (e.g. various checks + # for stringification implementation ordering). + # Ergo, we should use it every now and then, but we cannot + # enable it by default. + # "-Wunused-member-function" ) foreach(warning ${CHECKED_WARNING_FLAGS}) add_cxx_flag_if_supported_to_targets(${warning} "${targets}") |