<p>I've used CMake for quite some time, and I must admit that it'saverycomprehensiblebuildsystem.Thisis,infact,whatoriginallymadeitanattractiveoptiontome,sinceUNIXMakefilesaresomewhatcryptictoreadandwrite.However,asoflately,I've been moving away from CMake, especially for smaller projects that don'thavemanysourcefilesorcomplexdependencies.Thereareafewreasonsforthis.</p>
<p>Tostartoff,CMakeisbloated.I've always known it was bloated, and I know it'snotasbloatedasotherbuildsystems(I'm looking at you GNU Autotools), but I'vealwaysjustputupwithitsbloatednaturefortheconvenienceofhavingareadablebuildscript(the<code>CMakeLists.txt</code>file).However,onceyougettolearnthesyntaxofUNIXMakefiles,they're much faster and a lot less tedious, which is often what I'mlookingforinmysmallerprojects.</p>
<p>It's also somewhat dumb to use a program that all it will do is generate an enormous and inefficient <code>Makefile</code> that you could write yourself. This makes sense if we'retalkingaboutabuildsystemthatneedstoaccomplishverycomplicatedtasks,withacomplexbuildtreeanddependencies,butformostprojectsthissimplyisawasteoftime,computingpower,anddiskspace.It'smucheasiertojustwriteasmall<code>Makefile</code>.</p>
<p>SomethingannoyingaboutCMakeisthatit's hard to run other programs from CMake. UNIX Makefiles function practically like a shell script, and therefore you can run these commands by just writing them into a target'sinstructions.WithCMakeyouhavetoaddacustomcommandtoitsrepertoireandrunitfromthere.Thiscanbeextremelyannoyingdependingonhowmanycustomcommandsyouneedtorun,whilewithUNIXMakefilesyousimplyrunthemlikeyouwouldinashellscript.ThisalsomakesUNIXMakefileswaymoreversatile,sincetheycandoavarietyoftaskssimplyaspartofitsbuilt-infunctionalitywithoutaddingcustombits.</p>
<p>TherearesomeareaswhereIcanseeCMakebeinguseful,particularlywhenwewanttotestdependencies.Hand-writingthisintoa<code>Makefile</code>wouldbetimeconsumingandannoying,evenifwehadthehelpof<code>pkg-config</code>,whileinCMakeit's done almost automatically. So I can understand and will use CMake for large projects. But for anything that'ssmallenoughorsimpleenough,I'dratherjustuseaUNIXMakefile.</p>