What I need is to be able build a project on both Windows and Linux without the need to alter the platformio.ini file or alter the generated c_cpp_properies.json file.
This problem has appeared due to system administrators have restricted where a Windows development can output it’s build directories. Also there is a need to keep the directory structure Arduino CLI compatible. The project is stored on a git server and then pulled by remote developers using whatever operating system they have.
As you can see from the platformio.ini example below there are directories that are windows specific and although the managed to get translated into a linux file/path they are not ideal or required for Linux systems.
What I’m hoping for.
I would have thought that Platformio would allow conditional sectioning within the platformio.ini so that it would have “windows:” or “linux:” or some such mechanism similar to the vscode tasks.ini
Is there some functionality within PlatformIO that can meet the above requirements ?
build_dir = c:\projects\Build\DevOp
build_cache_dir = c:\projects\Build\Cache
src_dir = sketches\myproject
lib_dir = libraries
platform = espressif32
board = esp32doit-devkit-v1
framework = arduino