Conversion to CMake with tests and compile with C++ compiler.