Exactly what it sounds like. You run it in the terminal, it asks you a couple of questions and sets up a new CMake project for you, complete with git init, .clang-format, and a fairly customized CMakeLists.txt.
As of now, you can provide:
folder name: name of the folder where the project will be created in.project name: name used in the CMakeproject()command, defaults tofolder name.project version: version used in the CMakeproject()command, defaults to1.0.0.project languages: either C, CXX, or both. Used to configure other options and they're automatically given to the CMakeproject()command.c standard: integer value for the C standard to be used in the project. Only requested if C is amongproject languages. Used to set upCMAKE_C_STANDARD.cxx standard: integer value for the CXX standard to be used in the project. Only requested if CXX is amongproject languages. Used to set upCMAKE_CXX_STANDARD.main file: main source file created insidesrc/. Will provide a hello world snippet for C and C++.CMake version: used in the CMakecmake_minimum_required()command."use Mika's code formatting style?": Whether to include the.clang-formatthat I personally use. It's based in Mozilla's style. Check it out here."create a cmake target?"Whether to automatically add a target to the generatedCMakeLists.txt. If you say yes, then you'll be asked:target name: name of the target.target type: executable foradd_executable(), static foradd_library(... STATIC), you get the idea.executable, static, shared, and interfaceare supported. Extra boilerplate will be generated for you if available, namelyset_target_properties()and a fewtarget_compile_options().
"run git init?": Whether to rungit initin the project's folder. If you say yes, a.gitignorewill also be generated for you.
And that's all.
It's in crates.io, so you can install it through cargo:
cargo install cprojor clone the repo and install it from there:
cargo install --path wherever/you/cloned/this/thingThere's a silly feature that just enables some silly messages as a response when you say no to a particular question. Enable it by passing --features silly_stuff
Whenever you want to use it, just run it in your terminal. No flags, no nothing, just cproj.
... It's a rust crate.
cargo buildwhy did I even write this section