Abu Hurairah said: The Messenger of Allah ﷺ sent us along with a contingent, and said: If you find so-and-so. He then narrated the rest of the tradition to the same effect.
Hadith Referenceسنن ابي داود / كتاب الجهاد / 2674
Hadith Gradingالألبانی:صحيح | زبیر علی زئی:صحيح مسلم (3016)
Benefits and Issues: It is impermissible and forbidden to burn any prisoner or criminal with fire. However, in view of military interests, there is no harm in burning forts, buildings, etc. And the same ruling applies to gunpowder and bombardment. And if anyone happens to be affected by it, it is excused.
Source: Sunan Abu Dawood – Commentary by Shaykh Umar Farooq Saeedi, Page: 2674