How can I tell what architecture my code is being compiled for?

I am writing a kernel that needs to perform a warp vote. However, if I am compiling for an architecture that does not support the warp vote (i.e. CC less than 1.2, I think) then I have a sort of ugly workaround. I would like to know if there is a way I can check whether or not the warp vote functions are defined, or otherwise check the compute capability of the target architecture of the current compile.

Thanks for reading.

check the macro CUDA_ARCH to see if it’s greater than or equal to 120 (page 32 in nvcc.pdf from 2.2)