eclipse: remove repeated entries in include paths for C/C++

Make sure just unique include paths (both system and local) are
added to prevent overcrowding with useless redundant include paths
that grow up a lot the generated XML file and make the usage of
the GUI messy.
The filter was already there for Java/Python.
This commit is contained in:
Federico Pellegrin 2021-09-03 10:18:24 +02:00
parent 62918799db
commit 557139ecda
1 changed files with 4 additions and 2 deletions

View File

@ -133,9 +133,11 @@ class eclipse(Build.BuildContext):
path = p.path_from(self.srcnode) path = p.path_from(self.srcnode)
if (path.startswith("/")): if (path.startswith("/")):
cpppath.append(path) if path not in cpppath:
cpppath.append(path)
else: else:
workspace_includes.append(path) if path not in workspace_includes:
workspace_includes.append(path)
if is_cc and path not in source_dirs: if is_cc and path not in source_dirs:
source_dirs.append(path) source_dirs.append(path)