diff --git a/cmake/warnings.cmake b/cmake/warnings.cmake index 735821e6d..be44ffa79 100644 --- a/cmake/warnings.cmake +++ b/cmake/warnings.cmake @@ -55,46 +55,38 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") add_warning(strict-overflow=1) endif() - add_warning(suggest-override) - add_warning(suggest-destructor-override) - add_warning(unused) - add_warning(unreachable-code) - # TODO: these warnings are not enabled by default, but we consider them as useful and good to enable in the future - no_warning(implicit-int-conversion) - no_warning(implicit-float-conversion) - no_warning(unused-member-function) - no_warning(old-style-cast) - no_warning(non-virtual-dtor) - no_warning(float-conversion) - no_warning(sign-conversion) - no_warning(shorten-64-to-32) - no_warning(padded) - no_warning(missing-noreturn) - no_warning(c++17-extensions) -#elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") - # add_warning(pedantic) - # # Add compiler options only to c++ compiler - # function(add_cxx_compile_options option) - # add_compile_options("$<$,CXX>:${option}>") - # endfunction() - # add_warning(strict-overflow=1) - add_warning(delete-incomplete) - add_warning(duplicated-cond) - add_warning(disabled-optimization) - add_warning(init-self) - add_warning(bool-compare) - add_warning(logical-not-parentheses) - add_warning(logical-op) - add_warning(maybe-uninitialized) - add_warning(misleading-indentation) - add_warning(no-return-local-addr) - add_warning(odr) - add_warning(pointer-arith) - add_warning(redundant-decls) - add_warning(reorder) - add_warning(shift-negative-value) - add_warning(sizeof-array-argument) - add_warning(switch-bool) - add_warning(tautological-compare) - add_warning(trampolines) -#endif() +add_warning(suggest-override) +add_warning(suggest-destructor-override) +add_warning(unused) +add_warning(unreachable-code) +add_warning(delete-incomplete) +add_warning(duplicated-cond) +add_warning(disabled-optimization) +add_warning(init-self) +add_warning(bool-compare) +add_warning(logical-not-parentheses) +add_warning(logical-op) +add_warning(maybe-uninitialized) +add_warning(misleading-indentation) +add_warning(no-return-local-addr) +add_warning(odr) +add_warning(pointer-arith) +add_warning(redundant-decls) +add_warning(reorder) +add_warning(shift-negative-value) +add_warning(sizeof-array-argument) +add_warning(switch-bool) +add_warning(tautological-compare) +add_warning(trampolines) +no_warning(c++17-extensions) +# TODO: these warnings are not enabled by default, but we consider them as useful and good to enable in the future +no_warning(implicit-int-conversion) +no_warning(implicit-float-conversion) +no_warning(unused-member-function) +no_warning(old-style-cast) +no_warning(non-virtual-dtor) +no_warning(float-conversion) +no_warning(sign-conversion) +no_warning(shorten-64-to-32) +no_warning(padded) +no_warning(missing-noreturn) \ No newline at end of file