6 ms·
CMake is what made me realize that makefiles are too hard for humans to type. To this day, in my professional work, I've never seen a make based build system th
by nomel 6y ago
CMake is what made me realize that makefiles are too hard for humans to type. To this day, in my professional work, I've never seen a make based build system that didn't require the occasional "make clean" to generate a reliable build. The CMake generated makefiles showed me that this mythical text was possible, and the amount of time it saved was really appreciated.
- throwaway894345 6y agoCMake made me give up on C++ development. I actually liked C++ as a language, but it was exhausting and deeply uninteresting to write my own build system with a stringly-typed language that almost completely punts on package management (even the approach described in TFA is embarrassing to anyone who has used other mainstream languages) and has first-class support for certain dependencies (IIRC CMake has builtin functions for Qt and gtest and probably others). No doubt that CMake is a moderate improvement over Make, but it's still far, far worse than just about every other mainstream programming language's build tooling. EDIT: I remember being amazed when Go came out circa 2011 that I could just "go build" a project and it just worked. One had to understand "GOPATH" which was slightly counterintuitive but not too bad, and of course it wasn't reproducible (both of those problems are pretty much addressed nowadays via modules), but I was blown away that I could actually just "go build" or "go test" and focus on my application code instead of my project tooling.
- millstone 6y agoCMake tackles the unsexy challenge of cataloging every compiler on every platform. If things seem easier in Go, it's in part because Go mostly stays in its sandbox. Where Go interoperates, it's worse than CMake. For example, Go's build system for C (cgo) is configured by stitching together environment variables and magical comments: // #cgo CFLAGS: -DPNG_DEBUG=1 // #cgo amd64 386 CFLAGS: -DX86=1 // #cgo LDFLAGS: -lpng // #include <png.h> import "C" As bad as CMake is, that is even worse. Imagine making that stuff portable! CMake has major problems (package management and language, as you say) but I don't know of any other tool that solves the problem that CMake solves. https://golang.org/cmd/cgo/ https://golang.org/cmd/cgo/
- throwaway894345 6y agoThat’s fine, but 99% of programs don’t need the things that CMake provides over Go or Cargo or whatever.
- millstone 6y agoCMake quietly lifts heavy things behind the curtains. Cargo uses Rust, which uses LLVM, which builds with CMake.
- throwaway894345 6y agoThe same is true for Autoconf and friends, but they're still pure evil and the world would be a much better place without them. :)