mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Automatically enable LDF dependency chain+ mode (evaluates C/C++ Preprocessor conditional syntax) for Arduino library when “library.properties” has “depends” field // Resolve #3607
This commit is contained in:
@ -35,6 +35,7 @@ PlatformIO Core 4
|
|||||||
* Added a new ``-e, --environment`` option to `platformio project init <https://docs.platformio.org/page/core/userguide/project/cmd_init.html#cmdoption-platformio-project-init-e>`__ command that helps to update a PlatformIO project using existing environment
|
* Added a new ``-e, --environment`` option to `platformio project init <https://docs.platformio.org/page/core/userguide/project/cmd_init.html#cmdoption-platformio-project-init-e>`__ command that helps to update a PlatformIO project using existing environment
|
||||||
* Dump data intended for IDE extensions/plugins using a new `platformio project idedata <https://docs.platformio.org/page/core/userguide/project/cmd_idedata.html>`__ command
|
* Dump data intended for IDE extensions/plugins using a new `platformio project idedata <https://docs.platformio.org/page/core/userguide/project/cmd_idedata.html>`__ command
|
||||||
* Do not generate ".travis.yml" for a new project, let the user have a choice
|
* Do not generate ".travis.yml" for a new project, let the user have a choice
|
||||||
|
* Automatically enable LDF dependency `chain+ mode (evaluates C/C++ Preprocessor conditional syntax) <https://docs.platformio.org/page/librarymanager/ldf.html#dependency-finder-mode>`__ for Arduino library when "library.property" has "depends" field (`issue #3607 <https://github.com/platformio/platformio-core/issues/3607>`_)
|
||||||
* Fixed an issue with PIO Unit Testing when running multiple environments (`issue #3523 <https://github.com/platformio/platformio-core/issues/3523>`_)
|
* Fixed an issue with PIO Unit Testing when running multiple environments (`issue #3523 <https://github.com/platformio/platformio-core/issues/3523>`_)
|
||||||
* Fixed an issue with improper processing of source files added via multiple Build Middlewares (`issue #3531 <https://github.com/platformio/platformio-core/issues/3531>`_)
|
* Fixed an issue with improper processing of source files added via multiple Build Middlewares (`issue #3531 <https://github.com/platformio/platformio-core/issues/3531>`_)
|
||||||
* Fixed an issue with ``clean`` target on Windows when project and build directories are located on different logical drives (`issue #3542 <https://github.com/platformio/platformio-core/issues/3542>`_)
|
* Fixed an issue with ``clean`` target on Windows when project and build directories are located on different logical drives (`issue #3542 <https://github.com/platformio/platformio-core/issues/3542>`_)
|
||||||
|
2
docs
2
docs
Submodule docs updated: 0ed8c2da4d...922f89a0d4
@ -507,6 +507,26 @@ class ArduinoLibBuilder(LibBuilderBase):
|
|||||||
src_filter.append("+<utility%s*.%s>" % (sep, ext))
|
src_filter.append("+<utility%s*.%s>" % (sep, ext))
|
||||||
return src_filter
|
return src_filter
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dependencies(self):
|
||||||
|
# do not include automatically all libraries for build
|
||||||
|
# chain+ will decide later
|
||||||
|
return None
|
||||||
|
|
||||||
|
@property
|
||||||
|
def lib_ldf_mode(self):
|
||||||
|
if not self._manifest.get("dependencies"):
|
||||||
|
return LibBuilderBase.lib_ldf_mode.fget(self)
|
||||||
|
missing = object()
|
||||||
|
global_value = self.env.GetProjectConfig().getraw(
|
||||||
|
"env:" + self.env["PIOENV"], "lib_ldf_mode", missing
|
||||||
|
)
|
||||||
|
if global_value != missing:
|
||||||
|
return LibBuilderBase.lib_ldf_mode.fget(self)
|
||||||
|
# automatically enable C++ Preprocessing in runtime
|
||||||
|
# (Arduino IDE has this behavior)
|
||||||
|
return "chain+"
|
||||||
|
|
||||||
def is_frameworks_compatible(self, frameworks):
|
def is_frameworks_compatible(self, frameworks):
|
||||||
return util.items_in_list(frameworks, ["arduino", "energia"])
|
return util.items_in_list(frameworks, ["arduino", "energia"])
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user