No need to unset it if you're just going to reset it afterwards. You can use `set(CACHE FORCE)`.

Actually, I don't really like that you're changing this variable; this essentially executes inside someone else's CMake script, and you're messing with their variables without their knowledge. I'd prefer if you would just append different things to `OpenCV_EXTRA_LIBS_${__opttype}` depending on `CUDA_VERSION`.