mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-02-05 05:23:46 +00:00
fix: 更换去重算法,保证工程输出一致性
便于 git管理
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user