I have several products being built on the ESP32 platform, which uses CMAKE to determine which files to include in the build. I would like to determine the files to include via the cmakelists file programmatically. I know you can read in environment variables in cmake, so if platformio adds one for the build environment, that would be ideal.
I just checked, and there is no additional build flags being passed into the project, other then the ones I put in there. If there is a way to read those build flags in cmake, then I can just add my own custom one?