A more sensible build system for C/C++
Each CUM
project is specified by a Project.toml
file
Each project is expected to have a sources
and headers
directory in the same directory as the Project.toml
All .c
/.cpp
files are compiled into .o
files
All .h
/.hpp
files are included as -isystem
system headers and -I
user headers
In an effort to be cross-compatable with other C/C++ projects using other build systems, additional header paths are added to the compiler flags to avoid compiler errors
Assuming the binary is in your PATH...
cum init
- Crate a CUM project (binary/library)
cum build [project_root]
- Build a debug binary
cum release [project_root]
- Run release build/package script
cum lint
- Run source Code Linter
cum docs
- Alternative to Doxygen
cum serve
- Run the build debugger web server
cum include
- Generate the include path compiler flags (WARNING: it's alot. i recomend cum include > .txt
)
cum clean
- Remove the buildcache/
folder
cum tree
- Build a dependency graph (BETA)
cum run [debug/release] <binary>
- Build and Run the specified binary
# Required Variables
compiler = <compiler executable path>
linker = <linker executable path>
# Optional Variables
build_dir = <default: "buildcache/">
debug_flags = [<override the default debug compiler flags>]
release_flags = [<override the default release compiler flags]
release_script = <release .sh/.bat script/executable>
no_confirm = <true/false> # Enable or disable the splash confirmation dialog
git/hg clone <repoistory>
into the same directory as your Project.toml
[Dependency]
path = "./sdl2"
[Dependency]
path = "./glfw"
[Dependency]
path = "./glad"
rm -rf <repository>
lol
Also remove the [Dependency]
from your .toml
You can build either libraries or executable binaries.
If you chose to build a library you can choose to link your library dynamically. Do note that this is a security risk and should only be done if you intend to provide your end-users with modding support or are trying to create your own bloaty Java/NodeJS alternative
[Target]
type = <lib/bin>
lib = <static/dynamic>
entrypoint = *.cpp/.c
name = <binary name>
libs = [...]
CUM supports Windows/OSX/Linux
Install the .vimrc
from ...
vim -S session.vim