11 ms·
You lost me when you suggested cmake as a build tool. Its principal killer feature seems to be that it abstracts cross platform building. Unfortunately the pric
by angry_octet 11y ago
You lost me when you suggested cmake as a build tool. Its principal killer feature seems to be that it abstracts cross platform building. Unfortunately the price you pay for that is eventual insanity, an unreasoning desire to DESTROY EVERYTHING.
Stay away from cmake.
- ndesaulniers 11y agoI will pray for your soul. :P
- TwoBit 11y agoThe thing I hate about CMake is that it can't generate relative directory structure projects. That's stupid and no other build system of significance has this limitation.
- fit2rule 11y agoI don't know what you mean - can you explain this further? Because I've seen it do what I think you mean, but I guess I don't understand.
- halosghost 11y agoI have to agree honestly. I've tried many of the build systems out there, and I have settled on tup[1] as being one of the greatest creations ever. The Tupfiles are incredibly simple, the execution time is bloody fast, and it is more capable of creating easily-reproducible builds than anything else I've seen so far. I'd recommend you give it a look if you're not familiar with it. [1] http://gittup.org/tup/ http://gittup.org/tup/
- slavik81 11y agoHaving spent moderate to significant time with bjam, waf, qmake, make and cmake, I more or less settled on cmake because: A. It's what everyone else is using. B. It's simple to do common things. C. It's pretty darn fast with the Ninja backend. The only downside seems to be that the cmake language is ugly and limited. Fortunately, I only need to write a tiny amount of cmake code to build most of my projects, since find_package is so good. (Though, it probably sucks to be the guys making that work.) To be honest, every tool I've tried has kind of sucked. cmake just sucks the least. One day I'd like to investigate tup and shake, though.
- shadowmint 11y agoNo. cmake has won. The other build tools tried (scons, premake, autotools) and they failed. You don't like the syntax? Cry me a river. It does the job. None of the other ones do. Pragmatism > idealism. I don't care how pretty your build files are, if they don't actually work. /shrug.
- exDM69 11y agoCMake works well if you're building typical user space applications or libraries with dependencies to popular and typical libraries that CMake can find or follow typical conventions. It completely falls apart if you need to do something unusual or automate non-build tasks with it. E.g. building bootable kernel images (where you need a linker script, etc) with CMake is quite painful (I've done it, will not do it again). The best feature of CMake for me has been easy cross compiling so I can develop and remote debug Windows apps on my Linux box.
- bodyfour 11y agoSeven years ago I helped move a fairly complicated commercial codebase from automake to cmake. In the process, I wrote thousands of lines of complicated cmake macros to interface with the packaging system, etc. The end result was a love/hate relationship with cmake. Clearly, the weakness is its hokey scripting language. The shame is that if they'd just started with something halfway reasonable like lua it would have been easier to build the tool and it would be far more powerful. Instead, they couldn't resist writing their own DSL where everything you need to do is possible but just barely. I've done so many zany hacks over the years to force it to do what I needed. Granted, I did the major porting work to cmake 2.4. The newer versions are certainly better (no more duplicating the expression in IF()/ELSE()/ENDIF() statements!) but it's still pretty painful to write something non-trivial compared to any modern scripting language. However, the results of cmake are fantastic. Once you've got your CMakeLists.txt's working you can largely forget about it -- it'll just work, completely cross platform. If you need to target both UNIX compilers and the Visual Studio world it's probably the best solution.