summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9fa048f..a221c77 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,6 +24,10 @@ if ((PICO_PLATFORM STREQUAL "host") AND (NOT PICO_NO_GC_SECTIONS))
add_link_options("LINKER:--gc-sections")
endif()
+# Disable language misfeatures.
+add_compile_options(-Werror=vla)
+
+# Have the compiler help detect mistakes.
add_compile_options(-Wall -Wextra -Wswitch-enum -Werror)
string(TOUPPER "${CMAKE_BUILD_TYPE}" _upper_cmake_build_type)