From a03d2382af7ab3a53a7cf909613dbffc417896b7 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 17 Feb 2015 20:02:57 +0200 Subject: [PATCH] Grant libs with high priority for C Preprocessor when scan includes --- platformio/builder/tools/platformio.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/platformio/builder/tools/platformio.py b/platformio/builder/tools/platformio.py index ecc28ba8..351fe3ca 100644 --- a/platformio/builder/tools/platformio.py +++ b/platformio/builder/tools/platformio.py @@ -227,11 +227,17 @@ def BuildDependentLibraries(env, src_dir): # pylint: disable=R0914 # end internal prototypes deplibs = _get_dep_libs(src_dir) - env.Append(CPPPATH=[join("$BUILD_DIR", l) for (l, _) in deplibs]) + env.Prepend( + CPPPATH=[join("$BUILD_DIR", l) for (l, _) in deplibs] + ) # add automatically "utility" dir from the lib (Arduino issue) - env.Append(CPPPATH=[join("$BUILD_DIR", l, "utility") for (l, ld) in deplibs - if isdir(join(ld, "utility"))]) + env.Prepend( + CPPPATH=[ + join("$BUILD_DIR", l, "utility") for (l, ld) in deplibs + if isdir(join(ld, "utility")) + ] + ) libs = [] for (libname, inc_dir) in deplibs: