Skip setting `CUDA_NVCC_EXECUTABLE` if `CACHE_WRAPPER_DIR` not set. (#25006)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/25006
Builds without sccache or ccache would run into issues since
`CACHE_WRAPPER_DIR` would not be set. As a result `CUDA_NVCC_EXECUTABLE` would
be set to /nvcc and the build would fail.
ghstack-source-id: 88766907
Differential Revision: D16954651
fbshipit-source-id: fea41da52dc9f8f03e6356d348f5900978db3651