Barack Obama. Sean Gallup/Getty Images President Barack Obama described why he was cautiously optimistic about President-elect Donald Trump at a Thursday news conference in Germany alongside German Chancellor Angela Merkel.

Obama said the "solemn responsibility" of the office and the "extraordinary demands" made on the US demanded "seriousness" and Trump would "figure out pretty fast" that the demands of the job were "not things you can treat casually."

"And, if you're not serious about the job, then you probably won't be there very long because it will expose problems," he said. "Even when you're doing a good job, even when you are attentive. There are so many things that come across your desk."

The president also acknowledged that Trump's victory was "perhaps" the biggest upset in modern political history.

"He ran an extraordinarily unconventional campaign, and it resulted in the biggest political upset in perhaps modern political history, American history, and that means that he now has to transition to governance," Obama said. "And what I said to him was what may work in generating enthusiasm or passion during elections may be different than what will work in terms of unifying the country and gaining the trust of those who maybe didn't support him."

The president added that Trump indicated he understood both what Obama meant and a willingness to seek what was needed for unification of the country.

"That has to reflect himself in not only the things he says but in how he fills out his administration," Obama said. "And my hope is that is something he's thinking about because not only is the president of the United States somebody the entire country looks to for direction, but sets the agenda internationally in a lot of ways."