Hello,
I’m trying to exclude specific files and directories in the src-directory from the build.
PlatformIO has the ability to use the ‘src_filter’, but not when using esp32 as target (states at least the docu, I also tried it and it does not work…
See here:
https://docs.platformio.org/en/latest/frameworks/espidf.html
The
src_filter
option cannot be used. It’s done to preserve compatibility with existing ESP-IDF projects. List of source files is specified in the projectCMakeLists.txt
file.
But in my Project there is no CMakeLists.txt, so I just tried to create one in the src folder and put this line into the file:
add_subdirectory(diretorytoexclude [EXCLUDE_FROM_ALL])
As I expected, this does not work.
It does also not work if I put a CMakeLists.txt in the project folder and use this line:
add_subdirectory(src/diretorytoexclude [EXCLUDE_FROM_ALL])
Does anybody have an idea how I could add CMakeLists.txt file and get it working?
Dave