From 7c39352f4c31aedf63f2fc63ba9c53f8639f029b Mon Sep 17 00:00:00 2001 From: keeping passionate! <60807980+starry-m@users.noreply.github.com> Date: Mon, 14 Apr 2025 07:32:53 +0800 Subject: [PATCH] Fixed an error by running scons --tartget=cmake under LINUX, #10113 (#10164) Fixed an error by running scons --tartget=cmake under LINUX, and associated issue #10113 --- tools/cmake.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/cmake.py b/tools/cmake.py index 9a9affad48..7f7c26eb6c 100644 --- a/tools/cmake.py +++ b/tools/cmake.py @@ -64,7 +64,8 @@ def GenerateCFiles(env, project, project_name): CFLAGS = env['CFLAGS'].replace('\\', "/").replace('\"', "\\\"") if 'CXXFLAGS' in dir(rtconfig): - CXXFLAGS = env['CXXFLAGS'].replace('\\', "/").replace('\"', "\\\"") + cflag_str=''.join(env['CXXFLAGS']) + CXXFLAGS = cflag_str.replace('\\', "/").replace('\"', "\\\"") else: CXXFLAGS = CFLAGS AFLAGS = env['ASFLAGS'].replace('\\', "/").replace('\"', "\\\"")