Sunan an-Nasa'i, Book 8, Hadith 2 (In-Book)

It was narrated from Anas that the Prophet said: "One of the portents of the Hour will be that people will show off in building Masjids."

أَخْبَرَنَا سُوَيْدُ بْنُ نَصْرٍ، قَالَ أَنْبَأَنَا عَبْدُ اللَّهِ بْنُ الْمُبَارَكِ، عَنْ حَمَّادِ بْنِ سَلَمَةَ، عَنْ أَيُّوبَ، عَنْ أَبِي قِلاَبَةَ، عَنْ أَنَسٍ، أَنَّ النَّبِيَّ صلى الله عليه وسلم قَالَ ‏ "‏ مِنْ أَشْرَاطِ السَّاعَةِ أَنْ يَتَبَاهَى النَّاسُ فِي الْمَسَاجِدِ ‏" ‏ ‏.‏

sunnah.com