Possibly *[Sahara][1]* (1995) with Jim Belushi which was a remake of the 1943 movie of the same name which starred Humphrey Bogart.

>An American tank commander in Libya who, along with a handful of Allied soldiers, tries to defend an isolated well with a **limited supply of water** from a Libyan Afrika Korps battalion during the Western Desert Campaign of World War II.

Although the French soldier is not hallucinating, he does pantomime eating cheese.

[![enter image description here][2]][2]

The whole movie is available on [YouTube][3] in some regions with the scene at c.52:45

https://www.youtube.com/watch?v=Nzr4e-84qg0


  [1]: https://www.imdb.com/title/tt0114324
  [2]: https://i.sstatic.net/8C7H8VTKm.png
  [3]: https://youtu.be/m8TU2_fR8TM