3 ms·
CMake 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 sand
by millstone 6y ago
CMake 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. :)