In the Three Kingdom Period(220-280), the king of the state of Wei, Cao Rui, wanted to select a very capable man to work for him. He said to his ministers:"when choosing a talented person, always beware of one with a false reputatiopn. A false reputation is just like a picture of a cake, it cant relieve hunger."
Later, this idiom came to be used to mean comforting oneself with unrealistic thoughts, without solving practical problems.