From f6d1efd25b5ef6517e79f55859f4380c86d101b9 Mon Sep 17 00:00:00 2001 From: Cory Bloor Date: Tue, 25 Feb 2020 02:17:43 -0700 Subject: [PATCH] Enable exhaustive switch warning/error --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 688356a..79359a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,7 @@ endif() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -ffast-math") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=return-type") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=switch-enum") if(CMAKE_BUILD_TYPE STREQUAL "Debug") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Og")