It is CPPFLAGS. I seem to get the same behavior.
FWIW, I did get this response from NERSc but I don't know how to interpret it.
He seems to be saying that I don't need -mp=gpu for the device compiler (nvcc). He seems to think that I am adding -gpu.
nvcc -- The device compiler does not need any of those flags because it already knows that it's being fed cuda code. The warning you're seeing is coming from nvc (which is the host / CPU side compiler) if you're in the PrgEnv-nvidia environment. You should not need to add -mp=gpu and -cuda, please just add the -cuda flag (to your host code) not to the device code.
I will try to talk with this guy again.
Thanks,