gcmake-rust
is a C/C++ project configuration tool which acts as an abstraction layer over CMake.
Documentation is found in docs/Docs_Home.md.
This project uses CPM.cmake v0.38.7 for dependency management.
Among other things, this tool is able to:
- Generate full CMake configurations for an entire project tree.
- Generate new C/C++ projects, subprojects, and test projects.
- Generate header, source, and template-impl files in-tree.
The project overview is part of the documentation, and is found in docs/overview.md.
For common use cases, see the project overview docs page.
- Clone the repository:
git clone --recurse-submodules [email protected]:scupit/gcmake-rust.git
cd
into the cloned repository.- Switch to the desired branch or release tag:
git checkout v1.6.8
. - Run
cargo install --path .
to create an optimized build and install the resulting gcmake-rust executable to$HOME/.cargo/bin
(or%USERPROFILE%\.cargo\bin
on Windows). - Optionally, alias
gcmake-rust
to justgcmake
. - Run the executable:
gcmake-rust dep-config update
to install the external dependency compatibility configuration repository
The tool is now fully installed and ready to go.
To get started, try creating a new project with gcmake-rust new root-project 'your-project-name'
.
After stepping through the initializer, you will have a fully functioning CMake-compatible project.
After building and installing GCMake, step through the project initializer with
gcmake-rust new root-project 'your-project-name'
.
Once it finishes, you'll have a fully working, fully CMake compatible project.
After making any change to cmake_data.yaml in your project, run gcmake-rust
to regenerate
the CMakeLists.txt and Config.cmake.in files and re-run all validation checks.
- gcmake-rust: The gcmake C/C++ project configuration tool
- gcmake-test-project: The 'test case' project for gcmake-rust which also acts as its working example.
- gcmake-dependency-configs: The dependency compatibility layer repository which allows non-gcmake projects to be imported and consumed 'out of the box' by gcmake-rust.