diff --git a/cmake/compiler/gcc/target_imacros.cmake b/cmake/compiler/gcc/target_imacros.cmake index 31eadf2c66f1f7..804040411c5021 100644 --- a/cmake/compiler/gcc/target_imacros.cmake +++ b/cmake/compiler/gcc/target_imacros.cmake @@ -4,6 +4,6 @@ macro(toolchain_cc_imacros header_file) - zephyr_compile_options(-imacros ${header_file}) + zephyr_compile_options(--imacros=${header_file}) endmacro()