CMake tutorial code based on CMake 3.0.2, tested on Mac OS X 10.10 with Xcode 6.0.