More than 12,000 people have been forced to leave their homes in France after properties were at risk of being damaged by raging wildfires.