Defense Secretary Robert Gates said Wednesday that from what he has seen, both John McCainJohn Sidney McCainOvernight Defense: Pompeo lays out new Iran terms | Pentagon hints at more aggressive posture against Iran | House, Senate move on defense bill Senate GOP urges Trump administration to work closely with Congress on NAFTA Sarah Sanders: ‘Democrats are losing their war against women in the Trump administration’ MORE and Barack ObamaBarack Hussein ObamaThe true commander in tweet Meghan Markle's pre-royal 'finishing lessons' and an etiquette of equality Hannity on Acosta claim he was tough on Obama: 'Only thing missing were the pom-poms' MORE would take a "sensible approach" to Iraq once in office.

"Based on what I read in the newspapers, I think either person who is elected president is going to come in and take a close look at it," Gates said during an interview with CNN.

Despite the wide distance between Obama and McCain on Iraq, Gates said both will heavily weigh the options when approaching the "endgame" in Iraq.

"I've said repeatedly we can't get the endgame wrong. The next president would suffer the greatest consequences if we do get the endgame wrong, so I think whoever's elected is likely to take a fairly sensible approach to it," Gates said.