From 4cbd8948125a9070d8f342b6cb51bc02d108ca82 Mon Sep 17 00:00:00 2001 From: Roelf-Jilling Date: Wed, 15 Jan 2020 19:55:39 +0100 Subject: [PATCH] Enable more warnings in GCC --- tests/CMakeLists.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 973403f..c3a7327 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -98,11 +98,19 @@ else() $<$:-Wno-undefined-func-template> > $<$: + -Wdouble-promotion # float implicit to double + -Wlogical-op # suspicious uses of logical operators $<$,6>>: + -Wduplicated-cond # duplicated if-else conditions + -Wmisleading-indentation + -Wnull-dereference $<$: # no support for [[maybe_unused]] -Wno-unused-variable > > + $<$,7>>: + -Wduplicated-branches # identical if-else branches + > > ) endif(MSVC) @@ -194,6 +202,22 @@ else() -Wno-unknown-attributes -Wno-weak-vtables > + $<$: + -Wdouble-promotion # float implicit to double + -Wlogical-op # suspicious uses of logical operators + -Wuseless-cast # casting to its own type + $<$,6>>: + -Wduplicated-cond # duplicated if-else conditions + -Wmisleading-indentation + -Wnull-dereference + > + $<$,7>>: + -Wduplicated-branches # identical if-else branches + > + $<$,8>>: + -Wcast-align=strict # increase alignment (i.e. char* to int*) + > + > ) endif(MSVC)