Mishkat al-Masabih
He reported God’s Messenger as saying, “God forbids you to swear by your fathers. If anyone swears he must swear by God, or keep silent.” (Bukhari and Muslim.)
وَعَنْهُ أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ: «إِنَّ اللَّهَ يَنْهَاكُمْ أَنْ تَحْلِفُوا بِآبَائِكُمْ مَنْ كَانَ حَالِفًا فَلْيَحْلِفْ بِاللَّهِ أَوْ ليصمت»
Reference