Skip to content

Commit

Permalink
#2264: cmake: enable more warnings
Browse files Browse the repository at this point in the history
Enable more warnings and sort the flags alphabetically.
  • Loading branch information
cz4rs committed May 9, 2024
1 parent b16eb7a commit 5e8075d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmake/turn_on_warnings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ endmacro()

if(NOT DEFINED VT_WARNING_FLAGS)
add_cxx_compiler_flag_if_supported("-Wall")
add_cxx_compiler_flag_if_supported("-pedantic")
add_cxx_compiler_flag_if_supported("-Wshadow")
# add_cxx_compiler_flag_if_supported("-Wextra")
add_cxx_compiler_flag_if_supported("-Wno-unknown-pragmas")
add_cxx_compiler_flag_if_supported("-Wnon-virtual-dtor")
add_cxx_compiler_flag_if_supported("-Wshadow")
add_cxx_compiler_flag_if_supported("-Wsign-compare")
add_cxx_compiler_flag_if_supported("-Wsuggest-override")
add_cxx_compiler_flag_if_supported("-pedantic")
# Not really a warning, is still diagnostic related..
if (NOT CMAKE_CXX_COMPILER_ID STREQUAL Intel OR
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 2021)
Expand Down

0 comments on commit 5e8075d

Please sign in to comment.