Sync cmake tests with tests in makefile.am
Clean up dead code in cmake.
Fix formatting issue.
Merge pull request #725 from ricnewton/master

Sync cmake tests with tests in makefile.am