ESP32 - How to determine build environment in CMAKE

Usually PlatformIO adds a PLATFORMIO macro being equal to the used PlatformIO core version.

Can you see that being passed as -DPLATFORMIO=.... in the compiler flags in the project task → Advanced → Verbose Build?