Merge pull request #3253 from armink/fix_eclipse

[tools] remove unused path when using scons target eclipse.
This commit is contained in:
Bernard Xiong 2019-12-10 20:58:55 +08:00 committed by GitHub
commit 3dcc7a6487
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -336,6 +336,11 @@ def GenExcluding(env, project):
coll_dirs = CollectPaths(project['DIRS'])
all_paths = [OSPath(path) for path in coll_dirs]
# remove unused path
for path in all_paths:
if not path.startswith(rtt_root) and not path.startswith(bsp_root):
all_paths.remove(path)
if bsp_root.startswith(rtt_root):
# bsp folder is in the RT-Thread root folder, such as the RT-Thread source code on GitHub
exclude_paths = ExcludePaths(rtt_root, all_paths)