Allow to exclude/include source files from build process using src_filter // Resolve #240

This commit is contained in:
Ivan Kravets committed 2015-06-22 15:06:39 +03:00
1 parent 46461b0721
commit 3232ba6a6c
8 files changed
+278 -199

No files matched your search

+7
View File
@@ -77,6 +77,13 @@ PLATFORMIO_SRCBUILD_FLAGS
Allows to set :ref:`projectconf` option :ref:`projectconf_srcbuild_flags`.
.. _envvar_PLATFORMIO_SRC_FILTER:
PLATFORMIO_SRC_FILTER
~~~~~~~~~~~~~~~~~~~~~
Allows to set :ref:`projectconf` option :ref:`projectconf_src_filter`.
.. _envvar_PLATFORMIO_LDF_CYCLIC:
PLATFORMIO_LDF_CYCLIC
+22
View File
@@ -319,6 +319,28 @@ but will be applied only for the project source code from
This option can be set by global environment variable
:ref:`envvar_PLATFORMIO_SRCBUILD_FLAGS`.
.. _projectconf_src_filter:
``src_filter``
^^^^^^^^^^^^^^
This option allows to specify which source files should be included/excluded
from build process. Filter supports 2 templates:
* ``+<PATH>`` include template
* ``-<PATH>`` exclude template
``PATH`` MAST BE related from :ref:`projectconf_pio_src_dir`. All patterns will
be applied in theirs order.
`GLOB Patterns <http://en.wikipedia.org/wiki/Glob_(programming)>`_ are allowed.
By default, ``src_filter`` is predefined to
``+<*> -<.git/> -<svn/> -<examples/>``, which means "includes ALL files, then
exclude ``.git`` and ``svn`` repository folders and exclude ``examples`` folder.
This option can be set by global environment variable
:ref:`envvar_PLATFORMIO_SRC_FILTER`.
``install_libs``
^^^^^^^^^^^^^^^^