r/cpp • u/not_a_novel_account cmake dev • May 19 '26
Kiln - A CMake-compatible build system that can do what CMake can't
https://clehaxze.tw/gemlog/2026/05-17-releasing-kiln-a-cmake-compatiable-build-system-that-can-do-what-cmake-cant.gmi
0
Upvotes
16
u/AKostur May 19 '26
Where’s the elevator pitch for this? It’s positioned as doing something that cmake can’t. What is that thing?
32
u/SirLynix May 19 '26
So, a vibe coded implementation of CMake. Thanks but no thanks.
35
u/AvidCoco May 19 '26
Not clicking on any tech article with some anime cat girl as the thumbnail thanks.
5
u/ABlockInTheChain May 20 '26
The author of this project really loves globbing but I would never use a build system / build system generator which works that way unless it was possible to turn the behavior off.
Not every source file which happens to be present in a project should be built under every circumstance.
3
u/wiedereiner May 20 '26
And another build system was born....
2
u/EC36339 May 19 '26
Can it create a dummy MSBuild target for GLSL shaders without either producing stupid warnings or requiring MSBuild .props files?
Just wondering, because CMake can't do that. No idea what else it can't do.
2
u/OrphisFlo I like build tools May 19 '26
I lke the approach! Good luck with the project and keeping up with upstream changes.
A few things though:
- Make it a daemon to be able to reload build files in the background, update the build graph and be ready to support large monorepositories. Right now, I understand it's "fast enough", but you could probably do better since you have a holistic approach!
- I believe you have some sort of ccache support. I'm not sure if you can defer the work to ccache or if you have built-in functionality for caching build artefacts, which would be preferred. Windows builds would be slow because of having to spawn one extra process per compilation, which is already expensive. It also gives you opportunities to track a lot of things better such as paths that are passed around to ensure they are as relative as possible, to improve cache hits. CMake being notorious for using absolute paths everywhere isn't helping.
- Moonshot feature would be to have integration for the REAPI to do distributed builds. It's the API everyone uses to do remote builds with many build systems, and a better integration in the build tool itself is a great feature! That would put you in scope for supporting large commercial projects. In a way, this is what Google is doing when they are replacing Ninja with siso for Chromium builds.
- Optional breaking changes to specifically target Kiln would be interesting, such as enforcing CMakeLists.txt isolation to prevent side effects and allow auto-loading build files based on the dependency name. It could be a nice way to incubate experimental features to be proposed in CMake later.
3
u/G6L20 May 19 '26
I'm missing something... The main problem with CMake is it's ugly language... So, just why creating a new implementation of something that so many people hates ?
1
u/chibuku_chauya May 21 '26
What I would do is have Starlark as an alternative DSL for CMake. It’s a subset of Python used by a few other build systems like Bazel and Buck2. I would add a tool to ease migration and slowly phase out the current DSL while keeping everything else the same.
1
u/simplex5d May 21 '26
This looks cool, but for an alternative approach inspired by the best of CMake + SCons check out pcons, github here. Much more debuggable than cmake, as well as more explicit and clear, and not using an atrocious DSL to describe the build. :-)
1
u/jhasse May 22 '26
Very interesting I will be following the progress! There's no source code yet, right?
I've been doing something similar (making a CMake-compatible build system) but with the difference that it's written in Python and generates Ninja build files. Its goal is more to improve CMake's UX (better output, also from Ninja and compilers) and to be a play-ground for new Ninja features (e.g. it uses Validation Nodes for clang-tidy integration). Source code: https://github.com/jhasse/cja
0
u/tartaruga232 MSVC user, r/cpp_modules May 20 '26
There was once a product/service for distributed version control called "Kiln" (by the company Fog Creek). But it looks dead now. So maybe you can reuse that name.