You cannot have your cake and eat it
you can't have your cake and eat it(, too)
proverb You cannot have or do two things that are both desirable but normally contradictory or impossible to have or do simultaneously. Because "have" can also mean "eat," this expression may seem redundant. However, it is based on the meaning of "have" as "to possess," i.e., to maintain possession of one's cake while still eating it, an obvious impossibility. You're never going to save enough money to buy a house if you keep buying expensive crap you don't need. You can't have your cake and eat it, too. The boss wants to be everyone's friend in the office while still having their respect and compliance, but you can't have your cake and eat it.
Farlex Dictionary of Idioms. © 2015 Farlex, Inc, all rights reserved.
You cannot have your cake and eat it (too).
Prov. You cannot enjoy two desirable things at the same time. Jill: There's an apartment across the street from me, much bigger and prettier than mine, and it even costs less. I'd really like to rent it—but I don't want to go to the trouble of moving. Jane: You can't have your cake and eat it too. Fred: I want to lose weight, but I'm not willing to change the way I eat. Alan: You can't have your cake and eat it.
McGraw-Hill Dictionary of American Idioms and Phrasal Verbs. © 2002 by The McGraw-Hill Companies, Inc.