5 ms·
Cmake/ninja is becoming the standard for new C++ projects.
by hendzen 12y ago
Cmake/ninja is becoming the standard for new C++ projects.
- davexunit 12y agoCmake is a fucking nightmare to work with. Autotools are light years better and more robust than cmake.
- bodyfour 12y agoI have a love/hate relationship with cmake. Writing non-trivial functionality in cmake's language is possible but you're fighting the language the entire way. It would have been so much better if they'd just started with something like Lua and extended it instead of building their own barely-adequate scripting language. Some of the grossest code I've ever written is in cmake macros. On the other hand, the results you get from cmake are fantastic. Want to use ninja instead of make? Just pass a compile flag. Need Visual Studio project files? No problem. Xcode? Kdevelop? You're covered. Honestly I couldn't imagine ever going back to autotools at this point.
- nbkolchin 12y agoYou probably never build anything for Windows.
- norswap 12y agoThat's not what I asked though. Having worked with CMake, it seems more expressive than Make (meaning you don't have to contort it to make it do what you want), but it seems quite complex I the sense that I don't have a clear picture of its semantics, i.e. what's going on behind the hood.
- bodyfour 12y agocmake is a replacement for the autotools suite, not make itself. You're right that it can be tricky to use. One advantage cmake has is that you can tell it to emit files for ninja instead of traditional Makefiles. ninja is very well optimized for the problem of parallel building.