From 346997f8be66565ed8d5fe5d4ff1f8078ff8dec1 Mon Sep 17 00:00:00 2001 From: Alberto Escolar Piedras Date: Thu, 25 Jan 2024 11:03:05 +0100 Subject: [PATCH] cmake: Apply COMPILER_WARNINGS_AS_ERRORS also to nativesim runner When COMPILER_WARNINGS_AS_ERRORS is set, let's also have the native simulator runner (and anything Zephyr requests built with it) be built with the same option to treat warnings as errors. Otherwise we will miss those by default in CI. Signed-off-by: Alberto Escolar Piedras --- arch/posix/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/posix/CMakeLists.txt b/arch/posix/CMakeLists.txt index 7001e54e75f..2ec433ad5cb 100644 --- a/arch/posix/CMakeLists.txt +++ b/arch/posix/CMakeLists.txt @@ -108,6 +108,10 @@ elseif (CONFIG_NATIVE_LIBRARY) $ ) endif() + + if (CONFIG_COMPILER_WARNINGS_AS_ERRORS) + target_compile_options(native_simulator INTERFACE $) + endif() endif() if(CONFIG_EXTERNAL_LIBC)