Modify ceres to not build tests and some other modifications to play well with clang.
Fix build
Fix cmake to work with Xcode generator.