PlatformIO Community

Can platformio generate a “useable” cmake project from a platformio project?

Platformio now can generate a “fake” cmake project to support the clion ide, but it is only for code completion and etc, and couldn’t used to build the project.

A major idea of PlatformIO is that we unify everything under PlatformIO’s build and configuration system, so this is wanted. The only major exceptions are ESP-IDF and Zephyr, which have underlying CMake build systems that would be too hard to reimplement, thus why we just call into them. For all other cases, the CLion integration is exactly the way it should be, so that we can use platformio.ini configuration directives, instead of hacking in the CMakeLists and related files. PlatformIO is unable to generate a CMakeLists file which natively build the project and circumvent the PlatformIO build system, because that would circumvent the whole point of PlatformIO. It’s just used for code completion.

1 Like

What exactly are you looking for? PlatformIO at its core is a build system. So is cmake. Their features heavily overlap.

Why do you want to use cmake? Do you want to move away from PlatformIO and you are looking for a tool supporting the conversion?

Or are you looking for a mix of cmake and PlatformIO feature? If so, which PlatformIO features do want to continue to use?

1 Like