I have been using cmake to build my projects out of source, which is really convenient as you avoid polluting your source directory with unnecessary files.