The Battle of Monte Cassino wasn't in Africa. The landings at Casablanca, Oran and Algiers were. It was only after the French opposed, but were unable to defeat, the Allied landings that they switched sides.
Bir Hacheim occurred some six months before Operation Torch, and it was in North Africa.