mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Fix an issue for Project Generator when include path search order is inconsistent to what passed to the compiler // Resolve #2509
This commit is contained in:
@ -42,6 +42,7 @@ PlatformIO 3.0
|
|||||||
|
|
||||||
* Fixed "systemd-udevd" warnings in `99-platformio-udev.rules <http://docs.platformio.org/en/latest/faq.html#platformio-udev-rules>`__ (`issue #2442 <https://github.com/platformio/platformio-core/issues/2442>`_)
|
* Fixed "systemd-udevd" warnings in `99-platformio-udev.rules <http://docs.platformio.org/en/latest/faq.html#platformio-udev-rules>`__ (`issue #2442 <https://github.com/platformio/platformio-core/issues/2442>`_)
|
||||||
* Fixed an issue when ``-U`` in ``build_flags`` does not remove macro previously defined via ``-D`` flag (`issue #2508 <https://github.com/platformio/platformio-core/issues/2508>`_)
|
* Fixed an issue when ``-U`` in ``build_flags`` does not remove macro previously defined via ``-D`` flag (`issue #2508 <https://github.com/platformio/platformio-core/issues/2508>`_)
|
||||||
|
* Fixed an issue for Project Generator when include path search order is inconsistent to what passed to the compiler (`issue #2509 <https://github.com/platformio/platformio-core/issues/2509>`_)
|
||||||
|
|
||||||
3.6.7 (2019-04-23)
|
3.6.7 (2019-04-23)
|
||||||
~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
@ -26,6 +26,7 @@ from SCons.Script import AllowSubstExceptions # pylint: disable=import-error
|
|||||||
from SCons.Script import AlwaysBuild # pylint: disable=import-error
|
from SCons.Script import AlwaysBuild # pylint: disable=import-error
|
||||||
from SCons.Script import Default # pylint: disable=import-error
|
from SCons.Script import Default # pylint: disable=import-error
|
||||||
from SCons.Script import DefaultEnvironment # pylint: disable=import-error
|
from SCons.Script import DefaultEnvironment # pylint: disable=import-error
|
||||||
|
from SCons.Script import Import # pylint: disable=import-error
|
||||||
from SCons.Script import Variables # pylint: disable=import-error
|
from SCons.Script import Variables # pylint: disable=import-error
|
||||||
|
|
||||||
from platformio import util
|
from platformio import util
|
||||||
@ -216,8 +217,11 @@ if "envdump" in COMMAND_LINE_TARGETS:
|
|||||||
|
|
||||||
if "idedata" in COMMAND_LINE_TARGETS:
|
if "idedata" in COMMAND_LINE_TARGETS:
|
||||||
try:
|
try:
|
||||||
|
Import("projenv")
|
||||||
print("\n%s\n" % path_to_unicode(
|
print("\n%s\n" % path_to_unicode(
|
||||||
json.dumps(env.DumpIDEData(), ensure_ascii=False)))
|
json.dumps(
|
||||||
|
env.DumpIDEData(projenv), # pylint: disable=undefined-variable
|
||||||
|
ensure_ascii=False)))
|
||||||
env.Exit(0)
|
env.Exit(0)
|
||||||
except UnicodeDecodeError:
|
except UnicodeDecodeError:
|
||||||
sys.stderr.write(
|
sys.stderr.write(
|
||||||
|
@ -26,11 +26,11 @@ from platformio.managers.core import get_core_package_dir
|
|||||||
from platformio.proc import exec_command
|
from platformio.proc import exec_command
|
||||||
|
|
||||||
|
|
||||||
def _dump_includes(env):
|
def _dump_includes(env, projenv):
|
||||||
includes = []
|
includes = []
|
||||||
|
|
||||||
for item in env.get("CPPPATH", []):
|
for item in projenv.get("CPPPATH", []):
|
||||||
includes.append(env.subst(item))
|
includes.append(projenv.subst(item))
|
||||||
|
|
||||||
# installed libs
|
# installed libs
|
||||||
for lb in env.GetLibBuilders():
|
for lb in env.GetLibBuilders():
|
||||||
@ -135,7 +135,7 @@ def _get_svd_path(env):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
def DumpIDEData(env):
|
def DumpIDEData(env, projenv):
|
||||||
LINTCCOM = "$CFLAGS $CCFLAGS $CPPFLAGS"
|
LINTCCOM = "$CFLAGS $CCFLAGS $CPPFLAGS"
|
||||||
LINTCXXCOM = "$CXXFLAGS $CCFLAGS $CPPFLAGS"
|
LINTCXXCOM = "$CXXFLAGS $CCFLAGS $CPPFLAGS"
|
||||||
|
|
||||||
@ -145,7 +145,7 @@ def DumpIDEData(env):
|
|||||||
"defines":
|
"defines":
|
||||||
_dump_defines(env),
|
_dump_defines(env),
|
||||||
"includes":
|
"includes":
|
||||||
_dump_includes(env),
|
_dump_includes(env, projenv),
|
||||||
"cc_flags":
|
"cc_flags":
|
||||||
env.subst(LINTCCOM),
|
env.subst(LINTCCOM),
|
||||||
"cxx_flags":
|
"cxx_flags":
|
||||||
|
@ -832,7 +832,9 @@ class ProjectAsLibBuilder(LibBuilderBase):
|
|||||||
project_include_dir = self.env.subst("$PROJECTINCLUDE_DIR")
|
project_include_dir = self.env.subst("$PROJECTINCLUDE_DIR")
|
||||||
if isdir(project_include_dir):
|
if isdir(project_include_dir):
|
||||||
include_dirs.append(project_include_dir)
|
include_dirs.append(project_include_dir)
|
||||||
include_dirs.extend(LibBuilderBase.get_include_dirs(self))
|
for include_dir in LibBuilderBase.get_include_dirs(self):
|
||||||
|
if include_dir not in include_dirs:
|
||||||
|
include_dirs.append(include_dir)
|
||||||
return include_dirs
|
return include_dirs
|
||||||
|
|
||||||
def get_search_files(self):
|
def get_search_files(self):
|
||||||
|
Reference in New Issue
Block a user