I’m using a header-only library that includes a
src directory with benchmarks and tests. I want the build process to ignore everything in the library’s
I can add a
library.json file to the root directory of the library wherein I specify a source filter. Works great, but of course it’s manual and would have to be done by any project developer, because I don’t want to fork the lib maintain my own repo just to add the file. (And the library author is unlikely to accept a PR with PlatformIO specific file.)
I tried specifying a source filter in platformio.ini like
-<../.piolibdeps/library_name/src> (and variants with
...src/subdir/*.cpp), but that didn’t work.
src_filter works perfectly for this purpose. My test was bad. Also, Ivan’s alternative below works, too.
Should I be able to exclude library source files with a