Sayyiduna Ali (may Allah be pleased with him) said: Prayer is not to be performed facing a toilet, a bathhouse or a graveyard.