Wildfires raged across Europe amid a heat wave, with temperatures exceeding 40 degrees Celsius.