Beef up CMake build harness.
Add a .gitignore.