From 056d610a1660edf5fb8cbe6e556e580ed4d98229 Mon Sep 17 00:00:00 2001 From: Christian Rauch Date: Sun, 20 Oct 2024 00:58:15 +0200 Subject: [PATCH] turn 'switch' errors into warnings to notify about unhandled values Many sections of the code rely on switches over the ControlType enum to handle the different libcamera control types. When newer enum values are added with newer versions of libcamera, the 'switch' errors (-Wall) will prevent compilation even though the node will continue to work without supporting the new types. Relax this by turning all 'switch' errors into warnings again to notify the developer and implement support for these new type enum values later. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e3ca4a..f09a00b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,7 @@ set(CMAKE_CXX_STANDARD 17) if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(-Wall -Wextra -Wpedantic -Werror) + add_compile_options(-Wno-error=switch) add_link_options("-Wl,-z,relro,-z,now,-z,defs") endif()