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)