بسم الله الرحمن الرحيم
Taking graves as places of worship (masaajid) is a filthy innovation and as so is prohibited. It is a means to lead one to polytheism, based on the statement of the Prophet -sallahu alayhi wa salaam- “Allah cursed the Jews and Christians for taking the graves of their prophets as places of worship, so do not take graves as places of worship surely I prohibit you from such.” Collected by Al Bukhari, Muslim, and others. Consequently every place wherein one intends to pray becomes a masjid.
Translated by Najeeb Al Anjelesi
Source: المنظار في بيان كثير من الأخطاء الشائعة