From 82fc9f41512b8865036d5e8ef70b3a0a517e2c6c Mon Sep 17 00:00:00 2001 From: xuxin19 Date: Fri, 21 Mar 2025 15:51:30 +0800 Subject: [PATCH] cmake(bugfix):Separate extra flags to avoid parsing errors cc1: note: unrecognized command-line option '-Wno-cpp -Werror' may have been intended to silence earlier diagnostics cc1: note: unrecognized command-line option '-Wno-cpp -Werror' may have been intended to silence earlier diagnostics Signed-off-by: xuxin19 --- cmake/nuttx_toolchain.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/nuttx_toolchain.cmake b/cmake/nuttx_toolchain.cmake index 55ac9f92b33..3156d880414 100644 --- a/cmake/nuttx_toolchain.cmake +++ b/cmake/nuttx_toolchain.cmake @@ -49,7 +49,8 @@ endif() # Support CMake to define additional configuration options if(EXTRA_FLAGS) - add_compile_options(${EXTRA_FLAGS}) + separate_arguments(EXTRA_FLAGS_LIST UNIX_COMMAND "${EXTRA_FLAGS}") + add_compile_options(${EXTRA_FLAGS_LIST}) endif() # ~~~