diff --git a/CMakeLists.txt b/CMakeLists.txt index 238046952..7ac5d16f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,6 +30,11 @@ if (CMAKE_GENERATOR STREQUAL "Ninja" AND set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-color=always") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always") endif() +# Enable a whole bunch of warnings, but turn off: +# - implicit fallthrough because that does not recognize some cases where it's desired (and I *really* want this one!) +# - comment because we use a bunch of those, and they're not really all that harmful. +# - address, because that occurs for our mkostemp check (weak-linking requires us to compare `&mkostemp == nullptr`). +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wimplicit-fallthrough=0 -Wno-comment -Wno-address") # Disable exception handling. ADD_COMPILE_OPTIONS(-fno-exceptions)