diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9fa048f..659f530 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,12 @@ if ((PICO_PLATFORM STREQUAL "host") AND (NOT PICO_NO_GC_SECTIONS)) add_link_options("LINKER:--gc-sections") endif() +# Use modern C... +set(CMAKE_C_STANDARD 23) +# ... but with some misfeatures disabled. +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) @@ -118,7 +124,6 @@ function(add_lib_test arg_libname arg_testname) endfunction() add_subdirectory(libmisc) -add_subdirectory(libobj) add_subdirectory(libfmt) add_subdirectory(libcr) add_subdirectory(libcr_ipc) |