Meaning of preprocessor defines like __CUDABE__ and others

Hello, I’m trying to investigate CUDA compilation flow and CUDA header files. Can someone point out when flags like CUDABE, CUDACC and CUDA_ARCH set by the compiler?
Thanks in advance

[url]NVCC :: CUDA Toolkit Documentation explains CUDACC and CUDA_ARCH. Some symbols you may encounter may be used internally by the compiler.