Riyad as-Salihin 1711
Ibn 'Umar (May Allah be pleased with them) said:
I heard a man saying: "No, by the Ka'bah." I admonished him: "Do not swear by any thing besides Allah, for I heard the Messenger of Allah (ﷺ) saying, 'He who swears by anyone or anything other than Allah, has indeed committed an act of Kufr or Shirk'." [At- Tirmidhi] . [Some 'Ulama' are of the opinion that the words of the Prophet (ﷺ) that "He who swears by anyone or anything other than Allah has indeed committed an act of Kufr or Shirk," are in the nature of extreme admonition. And in fact, it is not Shirk. The same applies to the saying of the Prophet (ﷺ), who said, "showing off is Shirk."]
وعن ابن عمر رضي الله عنهما أنه سمع رجلا يقول‏:‏ لا والكعبة، قال ابن عمر‏:‏ لا تحلف بغير الله، فإني سمعت رسول الله صلى الله عليه وسلم  يقول‏:‏ ‏"‏من حلف بغير الله، فقد كفر أو أشرك‏"‏‏.‏‏(‏‏(‏ رواه الترمذي وقال حديث حسن‏)‏‏)‏	وفسر بعض العلماء قوله‏:‏ ‏"‏كفر أو أشرك‏"‏ على التغليظ، كما روي أن النبي صلى الله عليه وسلم  قال‏:‏ ‏"‏الرياء شرك‏"‏‏.‏