Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/crumblingstatue/cmakr
Simple tool to conveniently build/run cmake projects without having to manually change directories
https://github.com/crumblingstatue/cmakr
Last synced: about 1 month ago
JSON representation
Simple tool to conveniently build/run cmake projects without having to manually change directories
- Host: GitHub
- URL: https://github.com/crumblingstatue/cmakr
- Owner: crumblingstatue
- Created: 2018-10-29T18:54:31.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-05-20T09:10:14.000Z (over 2 years ago)
- Last Synced: 2024-10-15T21:11:04.349Z (3 months ago)
- Language: Rust
- Size: 11.7 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CMakr
CMakr is a tool to conveniently build/run your cmake projects without having to manually
switch to the appropriate directories.## `cmakr.toml`
To use CMakr, first you should define a `cmakr.toml` in the root directory of your project
(where the top-level `CMakeLists.txt` resides).Here is an example `cmakr.toml` for an imaginary video game called shootr:
```TOML
# The default binary to run. This is optional.
default-bin = "shootr"
# The default target to build. Optional.
default-target = "debug"# A target definition
[target.debug]
# Arguments to be passed to CMake
args = ["-DCMAKE_BUILD_TYPE=Debug"]
# Build command to use. Could be either `make`, `ninja`, etc.
build = "make"# Another target, just for the heck of it.
[target.release]
args = ["-DCMAKE_BUILD_TYPE=Release"]
build = "make"
```## Command line usage
```sh
# Build the `release` target
cmakr release
# If you have `default-target` defined in `cmakr.toml`, you can just do
cmakr
# Build and run the `shootr` executable of the `release` target
cmakr release -r shootr
# Now if you have both `default-target` and `default-bin` defined in `cmakr.toml`, you can simply
cmakr -r
# Anything after -- is considered args to the binary you're running
cmakr -r shootr -- --godmode --debug levels/01.lvl
```That's pretty much it in a nutshell.