From b533d7a1dde6377c65ec9c6cb0f18f9de0a28ce7 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 23 Oct 2019 22:31:26 +0300 Subject: [PATCH] LDF: Check global CPPPATH when looking for dependencies --- platformio/builder/tools/piolib.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/platformio/builder/tools/piolib.py b/platformio/builder/tools/piolib.py index 7f5484ce..2858eaa3 100644 --- a/platformio/builder/tools/piolib.py +++ b/platformio/builder/tools/piolib.py @@ -304,7 +304,10 @@ class LibBuilderBase(object): ): # all include directories if not LibBuilderBase._INCLUDE_DIRS_CACHE: - LibBuilderBase._INCLUDE_DIRS_CACHE = [] + LibBuilderBase._INCLUDE_DIRS_CACHE = [ + self.env.Dir(os.path.realpath(d) if os.path.isdir(d) else d) + for d in self.envorigin.get("CPPPATH", []) + ] for lb in self.env.GetLibBuilders(): LibBuilderBase._INCLUDE_DIRS_CACHE.extend( [self.env.Dir(d) for d in lb.get_include_dirs()] @@ -346,7 +349,7 @@ class LibBuilderBase(object): self.env.File(path), self.env, tuple(include_dirs) ) - # print(path, map(lambda n: n.get_abspath(), candidates)) + # print(path, [c.get_abspath() for c in candidates]) for item in candidates: if item not in result: result.append(item)