6 ms·
If only CMake weren't just as awful. It seems to have become an industry standard yet I can't begin to tell you how much time I've wasted wrestling with it lat
by radarsat1 6y ago
If only CMake weren't just as awful. It seems to have become an industry standard yet I can't begin to tell you how much time I've wasted wrestling with it lately. In an ideal world all projects would use CMake "correctly" but it's just not the case; problems are really hard to debug, no one really seems to know the current "right way" to do things, and the "right way" keeps changing anyway.
Coupled with an awful language, I just can't say that CMake is better, or much better, than autotools. But at least it handles Visual Studio and ninja. So yeah, we use it for the support it provides which is second-to-none, but it's a mostly terrible user experience, frankly.
- DagAgren 6y agoThe only reason CMake is considered better than automake is because automake is so unimaginably dreadful. CMake is a lot worse than pretty much any competent piece of software.
- mister_hn 6y agoYet CMake is much better and comes with support for installers (Deb/rpm/MSI/DMG), which is a killer feature. And now it's even better to couple it with Conan for dependency management
- irishcoffee 6y agoIgnoring the qt part entirely, I think qmake is the best of the bunch.
- dasloop 6y agoQt is moving to CMake too. And the latest versions of CMake are as good, or better, than qmake. Add to that vcpkg and you will have a fantastic solution for managing dependencies. Maybe CMake is not the best but is good enough and the new standard in the C++ world.
- irishcoffee 6y agoIt’s really not good enough, it’s ok to admit it. Nobody likes CMake, it just somehow won the makefile generator wars. Having to a learn shitty, esoteric language to compile my code Is not something that makes me more productive.
- jcelerier 6y ago> Having to a learn shitty, esoteric language to compile my code Is not something that makes me more productive. You say that but frankly between CMake code and Ant or msbuild ...
- irishcoffee 6y agoQmake. It’s simple, it’s cross-platform, it gets out of my way.
- jcelerier 6y agoit's also going the way of the dodo as Qt 6 is migrating to CMake :p
- irishcoffee 6y ago5 will get forked because of the way 6 is being licensed.
- jcelerier 6y ago6 will be licensed like 5 : https://www.embeddeduse.com/2019/12/21/safe-guarding-the-lgpl-future-of-qt/ https://www.embeddeduse.com/2019/12/21/safe-guarding-the-lgp...
- freedomben 6y agoI agree. qmake was much, much better to work with than cmake. I tend to believe the reason cmake won is because qmake was so associated with Qt. The best tech does not always win.
- codys 6y agoqmake is has very poor handling of dependencies between generate header files, like those used with protobuf. https://github.com/jmesmon/qmake-protobuf-example https://github.com/jmesmon/qmake-protobuf-example
- sansnomme 6y agoI thought the hip thing these days is to use Meson for C/C++ builds?
- ComputerGuru 6y agoMeson is excellent and would have eaten CMake out of house and home if it weren’t for the stupidity of it targeting C/C++ but being written in Python. A lot of C/C++ developers cringe at the thought of requiring Python as a build dependency.
- boris 6y agoYou may want to check build2[1] then. As a bonus you also get a Cargo-like package/project manager (but with a real build system underneath). Full disclosure: I am involved with the project. [1] https://build2.org https://build2.org
- pjmlp 6y agoGradle, implemented in a mix of Java and Groovy Maven, Ant, implemented in Java Sbt, implemented in Scala Leinigen, implemented in Clojure MSBuild, implemented in a mix of C++ and C# Gems, implemented in Ruby eggs, implemented in Python cargo, implemented in Rust Why should it be any different for C and C++? So vcpkg it is.
- ComputerGuru 6y agoComplete aside: I often find myself agreeing with contrarian or somewhat contentious dev-related posts here and on GitHub (I’m mqudsi there), look to the name of the author, and see yours. (I’m not sure why I decided to share this right now. Sorry.)
- radarsat1 6y agoFor me at least, using Python is the least of my concerns, in fact I like Python so having the build system in a familiar language instead of some esoteric DSL would be wonderful. Unfortunately SCons was too slow and had its own problems, but it wasn't a bad idea imho. That said one thing I like about autotools is how it generates a build system that doesn't depend on more than shell script and make, and can be packaged that way. It's annoying that CMake produces a build system that requires CMake to be present to build.