Linux, cmake

One thing that has been lax recently is the linux build of Catharsis. I do most of my development on Windows with Visual Studio (who doesn’t) so it’s easy to understand why this has slipped. This has been rectified.

In the beginning there were Makefiles. Writing them sucked. The time and effort required to write Makefiles to build large projects was ridiculous. Then, there was scons, and times were better. However, scons got increasingly sluggish the larger the project became. In addition, scons build files were Python scripts. “The power of Python in a build file,” they said. Soon I found myself writing long, esoteric build scripts that used fancy Python code simply because I could. I now know that this power is unnecessary and ultimately confusing. What was needed was a small set of well structured commands specific to building things. At last, there was cmake.

Tony had heard a lot of praise for cmake and during the holiday I was able to verify that cmake is infact great. Cmake is both simpler and faster than scons. It also does a lot of things you’d expect to be done by default by any modern build system: dependency checking, building in a seperate directory, etc. Perhaps the coolest feature is that, instead of being a build system in and of itself, cmake produces platform specific build files. I haven’t tried the build files produced for Visual C++ yet, but the prospect of having builds for all platforms specified by one set of files is exciting.

Leave a Reply