This commit is contained in:
Siarhei Fedartsou 2022-09-09 15:18:23 +02:00
parent 4b4f0e4b57
commit a3be76e24e

View File

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