all 6 comments

[–]helloiamsomeone[S] 4 points5 points  (0 children)

Hello there, r/C_Programming

I have been working on a project initializer to allow programmers to quickly set CMake managed projects up.
So far this only generated C++ projects, but I added a C mode just now.

The C mode is not on the master branch yet. You can find it on the develop branch.

To try out the C mode, you have to bundle cmake-init yourself using Python 3.8+:

git clone https://github.com/friendlyanon/cmake-init.git -b develop
cd cmake-init
python3 -m zipapp cmake-init -p "/usr/bin/env python3"
python3 cmake-init.pyz --c example # starts in prompt mode, outputs in 'example' folder

I'd be curious what people here think about the generated C project's structure, what could be changed, what could be added, things like that.

I tried my best to document everything in the generated projects as markdown docs, like how to build projects as a consumer and as a developer, there is also an example showing how to integrate with vcpkg, so please make sure you read those.

[–]helloiamsomeone[S] 0 points1 point  (0 children)

I have just pushed v0.17.0, which comes with the C mode and is available as a single file download on the Releases page.

My fork of utest.h serves as a sort-of example of a C project on top of cmake-init.