From 557139ecdac2c048890b6621a91ce89e275a64e0 Mon Sep 17 00:00:00 2001 From: Federico Pellegrin Date: Fri, 3 Sep 2021 10:18:24 +0200 Subject: [PATCH] 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. --- waflib/extras/eclipse.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/waflib/extras/eclipse.py b/waflib/extras/eclipse.py index e123fc16..ef057e8a 100644 --- a/waflib/extras/eclipse.py +++ b/waflib/extras/eclipse.py @@ -133,9 +133,11 @@ class eclipse(Build.BuildContext): path = p.path_from(self.srcnode) if (path.startswith("/")): - cpppath.append(path) + if path not in cpppath: + cpppath.append(path) else: - workspace_includes.append(path) + if path not in workspace_includes: + workspace_includes.append(path) if is_cc and path not in source_dirs: source_dirs.append(path)