If the roof is your own, no problem, but the smell of smoke should not be too heavy, which will affect the surrounding neighbors. If it's the roof of a building, you can have a barbecue, but if someone really complains, it's not illegal. It's just that your cigarettes annoy your neighbors or you're afraid of starting a fire.
No matter what you do, you must ensure your personal safety, so try to stay away from dangerous places.