It is narrated from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) "has cursed the women who visit graves, and those who establish mosques over them, and those who light lamps (on them) as well."
This is the wording of Shu'bah's hadith, and in their two narrations it is: "the women who frequently visit graves, those who build mosques over them, and those who light lamps."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 7206