Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ivankravets opened this issue Jun 19, 2015 · 0 comments
Closed
Assignees
Milestone

Comments

@ivankravets
Copy link
Member

Implement new option to build environment in platformio.ini named src_filter. This filter will consist of these templates:

  • +<PATH> include template
  • -<PATH> exclude template

Path MAST BE related from src_dir. All filters will be applied in theirs order.

GLOB patterns are allowed.

By default, src_filter is predefined to +<*> -<.git/> -<svn/> -<examples/>

Documentation

http://docs.platformio.org/en/latest/projectconf.html#src-filter

Example

Need to include ALL(+<*>) source files, then exclude "some/hal"(-<some/hal>) folder, then include specific "some/hal/platform"(+<some/hal/platform>) folder.

[env:some_env_name]
platform = ...
board = ...
src_filter = +<*> -<some/hal> +<some/hal/platform>

CC: @smartanthill , @nobugs-hare, @valeros

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant