Skip to content

Commit

Permalink
fix cmake generator collect flags
Browse files Browse the repository at this point in the history
  • Loading branch information
kaidegit committed Feb 22, 2025
1 parent 7bf657e commit 66a88ea
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tools/cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,17 @@ def GenerateCFiles(env, project, project_name):
OBJCOPY = tool_path_conv["CMAKE_OBJCOPY"]["path"]
FROMELF = tool_path_conv["CMAKE_FROMELF"]["path"]

CFLAGS = rtconfig.CFLAGS.replace('\\', "/").replace('\"', "\\\"")
CFLAGS = rtconfig.CFLAGS
for group in project:
if 'CFLAGS' in group.keys():
CFLAGS += ' ' + group['CFLAGS']
CFLAGS = CFLAGS.replace('\\', "/").replace('\"', "\\\"")
if 'CXXFLAGS' in dir(rtconfig):
CXXFLAGS = rtconfig.CXXFLAGS.replace('\\', "/").replace('\"', "\\\"")
CXXFLAGS = rtconfig.CXXFLAGS
for group in project:
if 'CXXFLAGS' in group.keys():
CXXFLAGS +='' + group['CXXFLAGS']
CXXFLAGS = CXXFLAGS.replace('\\', "/").replace('\"', "\\\"")
else:
CXXFLAGS = CFLAGS
AFLAGS = rtconfig.AFLAGS.replace('\\', "/").replace('\"', "\\\"")
Expand Down

0 comments on commit 66a88ea

Please sign in to comment.