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 8f016f7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,16 @@ if(CABLE_COMPILER_GNULIKE)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Og")

add_compile_options(
# -Wcast-align #TODO: Build fails on mips64
-Wcast-qual
-Wmissing-declarations
-Wsign-conversion
-Wundef
-Wunreachable-code
$<$<COMPILE_LANGUAGE:C>:-Wmissing-prototypes>
$<$<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 8f016f7

Please sign in to comment.