Initial commit of the CMake-based build system.

It only supports gfortran at the moment, tested on Linux only so far.