diff options
author | Roelf-Jilling <r-j.wolthuis@live.com> | 2020-01-15 21:55:39 +0300 |
---|---|---|
committer | Roelf-Jilling <r-j.wolthuis@live.com> | 2020-01-16 13:49:15 +0300 |
commit | 4cbd8948125a9070d8f342b6cb51bc02d108ca82 (patch) | |
tree | 0c372a28c2671d4edab1304540e040b03379e7f7 /tests | |
parent | d08ff53e612c18e7cc3622b0ffb9476353b9d9d9 (diff) |
Enable more warnings in GCC
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CMakeLists.txt | 24 |
1 files changed, 24 insertions, 0 deletions
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() $<$<CXX_COMPILER_VERSION:5.0.2>:-Wno-undefined-func-template> > $<$<CXX_COMPILER_ID:GNU>: + -Wdouble-promotion # float implicit to double + -Wlogical-op # suspicious uses of logical operators $<$<NOT:$<VERSION_LESS:$<CXX_COMPILER_VERSION>,6>>: + -Wduplicated-cond # duplicated if-else conditions + -Wmisleading-indentation + -Wnull-dereference $<$<EQUAL:${GSL_CXX_STANDARD},14>: # no support for [[maybe_unused]] -Wno-unused-variable > > + $<$<NOT:$<VERSION_LESS:$<CXX_COMPILER_VERSION>,7>>: + -Wduplicated-branches # identical if-else branches + > > ) endif(MSVC) @@ -194,6 +202,22 @@ else() -Wno-unknown-attributes -Wno-weak-vtables > + $<$<CXX_COMPILER_ID:GNU>: + -Wdouble-promotion # float implicit to double + -Wlogical-op # suspicious uses of logical operators + -Wuseless-cast # casting to its own type + $<$<NOT:$<VERSION_LESS:$<CXX_COMPILER_VERSION>,6>>: + -Wduplicated-cond # duplicated if-else conditions + -Wmisleading-indentation + -Wnull-dereference + > + $<$<NOT:$<VERSION_LESS:$<CXX_COMPILER_VERSION>,7>>: + -Wduplicated-branches # identical if-else branches + > + $<$<NOT:$<VERSION_LESS:$<CXX_COMPILER_VERSION>,8>>: + -Wcast-align=strict # increase alignment (i.e. char* to int*) + > + > ) endif(MSVC) |