Automate build with cmake
Update gitignore with cmake's autogenerated files
Fix build with clang