r/cprogramming • u/Slight_Watch697 • Jun 02 '26
A better build system for C: bbs
Hi, I recently started working on a better build system for my C/C++ projects:
https://github.com/luppichristian/bbs.
It's basically a build system "frontend" built on top of cmake and bash that allows you to:
- Metabuilder support (modify the compilation at runtime WITH CUSTOM HOOKED DLLS)
- Automatic SDK detection (Vulkan SDK, etc.)
- Cross-platform builds from a single configuration
- Cross-compilation support (WSL, Docker, remote toolchains)
- Automatic generation of
.gitignore, CI workflows, and project files - File watching + hot-builds (looking at directory changes)
- User-level package cache (dependencies downloaded once, reused everywhere, basically package system)
- Unified compiler abstraction (translate flags between MSVC/GCC/Clang automatically)
- Distribution pipeline for packaging releases
- Integrated CTest support
- Automatic toolchain setup and discovery
- Automatic assets copy in distribution setups
- Multi-target / multi-architecture builds
- No manual SDK paths or environment setup required
What CMAKE does not do:
- Discover and configure SDKs automatically
- Set up cross-compilation environments
- Manage user-wide dependency caches
- Generate CI pipelines
- Create distribution workflows
- Watch files and rebuild automatically
- Normalize compiler flags across toolchains
- Configure Docker/WSL build environments
Why Add Another Layer On Top Of CMake:
- CMake is widely used, but it still leaves a lot of multi-platform build setup in the hands of the project author
- You still need to model targets, platform differences, toolchain choices, and common workflows in a way that stays manageable across environments
Why Build On Top Of CMake Instead Of Replacing It:
- Most third-party C and C++ libraries already support CMake
- Building on top of it means it stay compatible with the tooling and dependency ecosystem people already use
Maybe planned features:
- shader compilation
- custom asset compilation and pipeline support
- metaprogramming features built around the Clang AST
NOTE: THIS IS AN EXPERIMENTAL PROJECT NOT PRODUCTION READY OR ANYTHING
I would appreciate if you try it out, since i am trying to fix as many bugs as possible.
Thank you