Skip to content

Support of CMake #1973

Open
Open
@FStefanni

Description

@FStefanni

Describe the request

There are many use cases for which the custom-made Arduino compilation process does not fit well or easily.

Some issues related to these needs are #1473 and #1407.

I also need more complex builds for my needs at work.

Actually, the truth is that complex scenarios require something less automatic, but well known and supported, which, for C and C++, it is CMake. CMake is great since allows to implement complex scenarios for the ones who need it, but it also allows to compile easily for non experts.

There have been many unofficial projects, the most up-to-date being:

https://github.com/technyon/Arduino-CMake-Toolchain,

but all of them are unofficial, meaning that they could support partial cases, be not up-to-date with the latest specification, and so on.

Supporting CMake also allow developers to use their preferred IDE without pain, since many of them are able to interact with CMake to get include paths, compile, etc..

So what I am suggesting is one of the following:

  • Switch from the custom build system, to the more standard CMake
    • Maybe, leveraging CMake to provide the automation currently provided for those who do not have more complex requirements
  • Provide a flag to generate CMake files, starting from the specification files of boards, platforms, libraries, etc.

So, in conclusion, I believe that supporting CMake would provide great value for many programmers.

Regards

Describe the current behavior

No CMake is supported, making integration in complex builds hard.

Arduino CLI version

0.28.0

Operating system

Linux

Operating system version

Debian testing

Additional context

Additional requests

Related

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the nightly build
  • My request contains all necessary details

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions