Sunan an-Nasa'i, Book 35, Hadith 9 (Nasa'i 3786)

It was narrated that Abu Hurairah said:

"The Messenger of Allah said: 'Do not swear by your fathers, nor by your mothers nor by the idols. Swear only by Allah, and do not swear unless you are sincere.'"