From 90ec4bf8a5ae618383490eaca69de40ed0738f54 Mon Sep 17 00:00:00 2001 From: Zingo Andersen Date: Tue, 10 Jun 2025 12:16:33 +0200 Subject: [PATCH] Arm backend: Build c/c++ code with -Wall -Werror This allows better detection of bad code. Signed-off-by: Zingo Andersen Change-Id: I728d4ccae24bf762c809e6994d2a7ab459d337f8 --- backends/arm/CMakeLists.txt | 2 ++ examples/arm/CMakeLists.txt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/backends/arm/CMakeLists.txt b/backends/arm/CMakeLists.txt index 39a51c56b14..b5e76e778a5 100644 --- a/backends/arm/CMakeLists.txt +++ b/backends/arm/CMakeLists.txt @@ -12,6 +12,8 @@ if(NOT EXECUTORCH_ROOT) set(EXECUTORCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../..) endif() +add_compile_options("-Wall" "-Werror") + include(${EXECUTORCH_ROOT}/tools/cmake/Utils.cmake) set(_common_include_directories ${EXECUTORCH_ROOT}/.. ${EXECUTORCH_ROOT}/runtime/core/portable_type/c10) diff --git a/examples/arm/CMakeLists.txt b/examples/arm/CMakeLists.txt index 4bae20d2c1f..58466faeca5 100644 --- a/examples/arm/CMakeLists.txt +++ b/examples/arm/CMakeLists.txt @@ -29,6 +29,8 @@ endif() set(_common_compile_options -Wno-deprecated-declarations -fPIC) +add_compile_options("-Wall" "-Werror") + # Let files say "include ". set(_common_include_directories ${EXECUTORCH_ROOT}/..)