Udated cmake for xcode build. Format code