Update cpp build script and .gitignore