Skip to content

Commit

Permalink
cmake: Enable more compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed Oct 4, 2021
1 parent 9786c6b commit b73eb6b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,17 @@ if(CABLE_COMPILER_GNULIKE)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Og")

add_compile_options(
-Wcast-align
-Wcast-qual
-Wmissing-declarations
-Wsign-conversion
-Wundef
-Wunreachable-code
$<$<COMPILE_LANGUAGE:C>:-Wmissing-prototypes>
$<$<COMPILE_LANGUAGE:CXX>:-Wextra-semi>
$<$<CXX_COMPILER_ID:Clang>:-Wduplicate-enum>
$<$<CXX_COMPILER_ID:Clang>:-Wnewline-eof>
$<$<CXX_COMPILER_ID:Clang>:-Wunreachable-code-aggressive>
)

if(MSVC) # clang-cl
Expand Down

0 comments on commit b73eb6b

Please sign in to comment.