This adds a CMake build script to be run by Travis.
Since some configuration switches are not part of the CMake options,
some builds are redundant, which is not perfect.
Also the `BUILD` and `EXTRAFLAGS` cases are not handled since CMake has
different targets/variables to achieve the same result. This can be
improved later.
Depends on D4855.