From 71ad1c358bf3ee09ed57af39f042c576b885f002 Mon Sep 17 00:00:00 2001 From: CYFS <2805686936@qq.com> Date: Tue, 6 Jan 2026 15:53:36 +0800 Subject: [PATCH] [tools][cmake]:Fix the cmake creation error of scons --- tools/targets/cmake.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/targets/cmake.py b/tools/targets/cmake.py index e998a48e8cd..e6c733217d8 100644 --- a/tools/targets/cmake.py +++ b/tools/targets/cmake.py @@ -62,7 +62,8 @@ def GenerateCFiles(env, project, project_name): OBJCOPY = tool_path_conv["CMAKE_OBJCOPY"]["path"] FROMELF = tool_path_conv["CMAKE_FROMELF"]["path"] - CFLAGS = env['CFLAGS'].replace('\\', "/").replace('\"', "\\\"") + CFLAGS = "".join(env['CFLAGS']) + CFLAGS = CFLAGS.replace('\\', "/").replace('\"', "\\\"") if 'CXXFLAGS' in dir(rtconfig): cflag_str=''.join(env['CXXFLAGS']) CXXFLAGS = cflag_str.replace('\\', "/").replace('\"', "\\\"")