Skip to content

Commit

Permalink
compileroptions.cmake: added some more warnings to evaluate
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Nov 25, 2024
1 parent ceb3b97 commit 796d5b5
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions cmake/compileroptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,24 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")

add_compile_options(-Wsuggest-attribute=noreturn)
add_compile_options_safe(-Wuseless-cast)

# TODO: evaluate
#add_compile_options_safe(-Wduplicated-branches)
#add_compile_options_safe(-Wduplicated-cond)
#add_compile_options_safe(-Wformat=2)
#add_compile_options_safe(-Wformat-overflow=2)
#add_compile_options_safe(-Wformat-signedness)
#add_compile_options_safe(-Wnull-dereference)
#add_compile_options_safe(-Wnrvo)
#add_compile_options_safe(-Wimplicit-fallthrough=5)
#add_compile_options_safe(-Wmissing-include-dirs)
#add_compile_options_safe(-Wunused)
#add_compile_options_safe(-Wunused-const-variable)
#add_compile_options_safe(-Wuninitialized)
#add_compile_options_safe(-Wsuggest-attribute=pure)
#add_compile_options_safe(-Wsuggest-attribute=const)
#add_compile_options_safe(-Wunused-macros)
#add_compile_options_safe(-Wpedantic)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 14 OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 14)
# TODO: verify this regression still exists in clang-15
Expand Down

0 comments on commit 796d5b5

Please sign in to comment.