fix: 更换去重算法,保证工程输出一致性

便于 git管理
This commit is contained in:
蒙蒙plus
2025-12-30 17:26:23 +08:00
committed by Meco Man
parent c39e92f4c1
commit d9c74834b0
2 changed files with 5 additions and 4 deletions

View File

@@ -579,8 +579,8 @@ def DefineGroup(name, src, depend, **parameters):
group['name'] = name
group['path'] = group_path
if type(src) == type([]):
# remove duplicate elements from list
src = list(set(src))
# remove duplicate elements from list while preserving order
src = list(dict.fromkeys(src))
group['src'] = File(src)
else:
group['src'] = src

View File

@@ -131,10 +131,11 @@ def IARProject(env, target, script):
print('not found LIB: ' + item)
# make relative path
paths = set()
paths = {}
for path in CPPPATH:
inc = _make_path_relative(project_path, os.path.normpath(path))
paths.add(inc) #.replace('\\', '/')
paths[inc] = None # 使用 dict 去重并保持插入顺序
paths = list(paths.keys())
# setting options
options = tree.findall('configuration/settings/data/option')