Defense Secretary Robert Gates said Wednesday that from what he has seen, both John McCainJohn McCainFrustrated Dems say Obama botched Russia response Coats: Trump seemed obsessed with Russia probe The Hill's Whip List: Senate ObamaCare repeal bill MORE and Barack ObamaBarack ObamaTrump breaks with tradition, forgoes Ramadan dinner Trump: 'Why no action' from Obama on Russian meddling? Dems look to defense bill to put pressure on Trump 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.