Set environmental variable for GPS in underground_physics

I have built a model which is a modified version of the underground_physics example.

This example has the option to use either its own implementation of a particle gun (dmx/gun etc), or use the general particle source. I have reached the point where I would like to use the general particle source, and according to the README, this requires setting the environmental variable DMXENV_GPS_USE. This is where I am running into problems. I have used the command
export DMXENV_GPS_USE=1
and re-ran cmake, before recompiling the executable. This does not allow the use of the general particle source.

My assumption here is that I am setting the environmental variable incorrectly, so I would appreciate some guidance in this area.

Thank you in advance.

I can see in CMakeLists.txt the following comment:
#Use GPS if the environment variable is set, and the user has not supplied the CMake
#command line argument. Otherwise, the argument of the command line has the priority.

The environmental variable is set (I think; it is according to the output of printenv). Can I therefore conclude that that issue is in the CMake command line argument? I have been inputting the following for cmake:
cmake -DGEANT4_DIR=/home/emma/G4-2/install/lib/Geant4-10.05 /home/emma/G4-2/underground_physics
Am I missing something here?