Build systems or Make Replacements.

When I moved away from Visual Studio and to Eclipse, I needed to replace the build system. My original motivation for an alternate build system actually arose when I was still an avid Visual C++ user. I had somehow settled on a non-default project settings for my builds as I always linked with the static runtime for reasons I do not fully remember now. Anyways, every time I made a new VS project, I needed to go through and manual change things through their GUI which was cumbersome and slow. So I started to look into alternate build systems that could generate the proj files for me. In fact, what I did at first was write my own tool that did it for me, then I started looking for an alternate more appropriate tool.


My requirements were:

  • Must generate project files for visual studio (or now Eclipse)
  • Must be fast
  • Must be easy to use

There are actually tons of build systems out there:

All of them have pros and cons. Tools like  Tup or Jam all are fast and closer to what one might expect in a makefile, yet the syntax for them is extremely terse and unfriendly, which while allowing experts the ability to create a build script with very few keystrokes, does not allow beginners an easy entry to the system. These build systems designed a DSL to be extremely compact whereas IMO they should have designed a DSL that was easy to learn and use. CMake on the other hand made their DSL extremely verbose and IMO limited, which again makes it harder to learn than what it should be.

Currently CMake and SCons seem to be the widest adopted of the non make-based tools. After discovering that SCons visual studio support was hackish at the time and that Waf was linux only at the time (Both have much better Visual Studio support now) I went with CMake. Honestly, I don’t like CMake that much. Their custom language is the worst language I have ever seen in my life and while the developer seem to have been open to a Lua extension at one point, it seems that they are very excited about their crappy CMake language. The good thing about CMake is that after using it for a little bit, you can make some simple build scripts with it and then do a bunch of copy pasting of that script for new projects.

As things would have it, I’ve spent part of today re-researching build systems. It turns out that Waf now has support for Visual Studio and Eclipse project files, which means it is now cross platform and SCons seems to have good Visual Studio support. I think I will convert some of my build scripts over to SCons and Waf and test them out now. SCons is supposed to have ironed out some of the build speed issues and Waf seems to have a lot more features than it used to.


~ by ra1ndog on November 16, 2011.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: