From ff75907e9a3d48d7196591e89787242519b15bb7 Mon Sep 17 00:00:00 2001 From: Andrey Starodubtsev Date: Sun, 12 Apr 2026 14:50:15 +0300 Subject: [PATCH] IAR: Implement COMPILE_WARNING_AS_ERROR --- Modules/Compiler/IAR.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Modules/Compiler/IAR.cmake b/Modules/Compiler/IAR.cmake index 97e1adb5e3..14c6cf2760 100644 --- a/Modules/Compiler/IAR.cmake +++ b/Modules/Compiler/IAR.cmake @@ -23,6 +23,8 @@ macro(__compiler_iar_common lang) string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -Oh -r -DNDEBUG") set(CMAKE_${lang}_LINK_MODE LINKER) + + set(CMAKE_${lang}_COMPILE_OPTIONS_WARNING_AS_ERROR "--warnings_are_errors") endif() set(CMAKE_${lang}_OUTPUT_EXTENSION_REPLACE 1)