diff --git a/cmake/compiler/iar/target.cmake b/cmake/compiler/iar/target.cmake index 432c1238b70..9cf625ce3b9 100644 --- a/cmake/compiler/iar/target.cmake +++ b/cmake/compiler/iar/target.cmake @@ -86,7 +86,7 @@ endif() # Enable VLA if CONFIG_MISRA_SANE is not set and warnings are not enabled. if(NOT CONFIG_MISRA_SANE AND NOT DEFINED W) - list(APPEND IAR_COMMON_FLAGS --vla) + list(APPEND IAR_COMMON_FLAGS $<$:--vla>) endif() # Minimal ASM compiler flags