Swearing by anything or anyone other than Allah is an act of minor Shirk (associating other partners with Allah that is not tantamount to taking a Muslim out of Islam); based on the Hadith reported by Imams
Ahmad,
Abu Dawud and
Al-Tirmidhy that the Prophet (peace be upon him) said:
Anyone who swears by other than Allah has committed Kufr or Shirk.
If a person aims at glorifying the thing sworn by in the same way that Allah is glorified, this is considered major Shirk (associating others with Allah in His Divinity or worship that takes the Muslim out of Islam), whether the thing sworn by is concrete or abstract; all this is not permissible.May Allah grant us success. May peace and blessings be upon our Prophet Muhammad his family and Companions.