CMake Project initialization

I want CMake to have a project initializer to start quickly, similar to xmake or cargo init - The Cargo Book. The advantage for new users is they don’t have to deal with CMake files. One of the goals is to provide a very simple project to get a project going. I don’t want this command to support hundreds of use cases, it would be minimalist, simple and easy to maintain.

The suggested user interface can look something like this:

$ cmake --create my-project
$ cd my-project
$ cmake -S. -Bbuild

The user didn’t have to create/manipulate any CMake files or learn the syntax. The new command will provide a minimalist CMake project initializer, and it will set up a new project ready to be compiled.

If we compare this to the current way, without any external help from 3rd party tools it looks something like this:

$ mkdir my-project
$ cd my-project
$ $EDITOR main.cpp // Write default hello world!
$ $EDITOR CMakeLists.txt // Write minimum of 2 lines to get started
$ cmake -S. -Bbuild

There are 3rd party tools that can provide project initializers for CMake. Here is an example: cmake-init · PyPI. One issue that I see with those tools is that you need to install something else to get started with CMake. If a user requires something more complex or an enterprise template, I think that should be a 3rd party tool.

CMake is a meta-build system. If I want a project generator, maybe I should use a different tool?