mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Allow to control cyclic behaviour of Library Dependency Finder
This commit is contained in:
@ -4,8 +4,9 @@ Release History
|
||||
2.0.1 (2015-??-??)
|
||||
------------------
|
||||
|
||||
* Handle new environment variable
|
||||
* Handle new environment variables
|
||||
`PLATFORMIO_BUILD_FLAGS <http://docs.platformio.org/en/latest/envvars.html#platformio-build-flags>`_
|
||||
and `PLATFORMIO_LDF_CYCLIC <http://docs.platformio.org/en/latest/envvars.html#platformio-ldf-cyclic>`_
|
||||
* Pass to API requests information about Continuous Integration system. This
|
||||
information will be used by PlatformIO-API.
|
||||
* Use ``include`` directories from toolchain when initialising project for IDE
|
||||
|
@ -77,6 +77,13 @@ PLATFORMIO_SRCBUILD_FLAGS
|
||||
|
||||
Allows to set :ref:`projectconf` option :ref:`projectconf_srcbuild_flags`.
|
||||
|
||||
.. _envvar_PLATFORMIO_LDF_CYCLIC:
|
||||
|
||||
PLATFORMIO_LDF_CYCLIC
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Allows to set :ref:`projectconf` option :ref:`projectconf_ldf_cyclic`.
|
||||
|
||||
Settings
|
||||
--------
|
||||
|
||||
|
@ -331,7 +331,7 @@ Example:
|
||||
``use_libs``
|
||||
^^^^^^^^^^^^
|
||||
|
||||
Specify libraries which should be used by ``Library Dependency Finder`` with
|
||||
Specify libraries which should be used by ``Library Dependency Finder (LDF)`` with
|
||||
the highest priority.
|
||||
|
||||
Example:
|
||||
@ -344,7 +344,7 @@ Example:
|
||||
``ignore_libs``
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
Specify libraries which should be ignored by ``Library Dependency Finder``
|
||||
Specify libraries which should be ignored by ``Library Dependency Finder (LDF)``
|
||||
|
||||
Example:
|
||||
|
||||
@ -353,6 +353,30 @@ Example:
|
||||
[env:ignore_some_libs]
|
||||
ignore_libs = SPI,EngduinoV3_ID123
|
||||
|
||||
.. _projectconf_ldf_cyclic:
|
||||
|
||||
``ldf_cyclic``
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
Control cyclic (recursive) behaviour for ``Library Dependency Finder (LDF)``.
|
||||
By default, this option is turned OFF (``ldf_cyclic=False``) and means, that
|
||||
``LDF`` will find only libraries which are included in source files from the
|
||||
project :ref:`projectconf_pio_src_dir`.
|
||||
|
||||
If you want to enable cyclic (recursive, nested) search, please set this option
|
||||
to ``True``. Founded library will be treated like a new source files and
|
||||
``LDF`` will search dependencies for it.
|
||||
|
||||
This option can be set by global environment variable
|
||||
:ref:`envvar_PLATFORMIO_LDF_CYCLIC`.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
[env:libs_with_enabled_ldf_cyclic]
|
||||
ldf_cyclic = True
|
||||
|
||||
|
||||
.. _projectconf_examples:
|
||||
|
||||
|
@ -38,6 +38,7 @@ commonvars.AddVariables(
|
||||
("SRCBUILD_FLAGS",),
|
||||
("IGNORE_LIBS",),
|
||||
("USE_LIBS",),
|
||||
("LDF_CYCLIC",),
|
||||
|
||||
# board options
|
||||
("BOARD",),
|
||||
|
@ -278,7 +278,10 @@ def BuildDependentLibraries(env, src_dir): # pylint: disable=R0914
|
||||
len(state['ordered']) + 1, finder.getLibName(),
|
||||
_lib_dir))
|
||||
state['libs'].add(_lib_dir)
|
||||
state = _process_src_dir(state, _lib_dir)
|
||||
|
||||
if getenv("PLATFORMIO_LDF_CYCLIC",
|
||||
env.subst("$LDF_CYCLIC")).lower() == "true":
|
||||
state = _process_src_dir(state, _lib_dir)
|
||||
return state
|
||||
|
||||
# end internal prototypes
|
||||
|
Reference in New Issue
Block a user