**File:** cmake/OpenCVDetectCUDALanguage.cmake
**Change Type:** added
**Context:** PR #23021: `cuda`: CMake add CUDA first class language support

**Code Changes:**
```diff
@@ -0,0 +1,154 @@
+#######################
+# Previously in FindCUDA and still required for FindCUDNN
+macro(FIND_CUDA_HELPER_LIBS _name)
+  if(CMAKE_CROSSCOMPILING AND (ARM OR AARCH64))
+    set(_cuda_cross_arm_lib_dir "lib/stubs")
+  endif()
+  find_library(CUDA_${_name}_LIBRARY ${_name}
+    NAMES ${_name}
+    PATHS "${CUDAToolkit_LIBRARY_ROOT}"
```

Review comment:
That's the output without the changes > --generate-code=arch=compute_86,code=[sm_86] -Xcompiler=-fPIC -D_FORCE_INLINES -Xcompiler -DCVAPI_EXPORTS -fPIC "-Xcompiler with the changes > --generate-code=arch=compute_86,code=[sm_86] -Xcompiler=-fPIC -D_FORCE_INLINES -Xcompiler=-DCVAPI_EXPORTS -Xcompiler=-fPIC "-Xcompiler= I get the following ccache output <details> <summary>mean_shift.cu</summary> > [2023-08-28T22:03:45.864586 15306] === CCACHE 4.8.2 STARTED ========================================= > [2023-08-28T22:03:45.864594 15306] Configuration file: /home/b/.ccache/ccache.conf > [2023-08-28T22:03:45.864595 15306] System configuration file: /usr/local/etc/ccache.conf > [2023-08-28T22:03:45.864595 15306] Config: (default) absolute_paths_in_stderr = false > [2023-08-28T22:03:45.864595 15306] Config: (default) base_dir = > [2023-08-28T22:03:45.864595 15306] Config: (default) cache_dir = /home/b/.ccache > [2023-08-28T22:03:45.864595 15306] Config: (default) compiler = > [2023-08-28T22:03:45.864595 15306] Config: (default) compiler_check = mtime > [2023-08-28T22:03:45.864595 15306] Config: (default) compiler_type = auto > [2023-08-28T22:03:45.864595 15306] Config: (default) compression = true > [2023-08-28T22:03:45.864595 15306] Config: (default) compression_level = 0 > [2023-08-28T22:03:45.864595 15306] Config: (default) cpp_extension = > [2023-08-28T22:03:45.864595 15306] Config: (default) debug = false > [2023-08-28T22:03:45.864595 15306] Config: (default) debug_dir = > [2023-08-28T22:03:45.864595 15306] Config: (default) depend_mode = false > [2023-08-28T22:03:45.864595 15306] Config: (default) direct_mode = true > [2023-08-28T22:03:45.864595 15306] Config: (default) disable = false > [2023-08-28T22:03:45.864595 15306] Config: (default) extra_files_to_hash = > [2023-08-28T22:03:45.864595 15306] Config: (default) file_clone = false > [2023-08-28T22:03:45.864595 15306] Config: (default) hard_link = false > [2023-08-28T22:03:45.864595 15306] Config: (default) hash_dir = true > [2023-08-28T22:03:45.864595 15306] Config: (default) ignore_headers_in_manifest = > [2023-08-28T22:03:45.864595 15306] Config: (default) ignore_options = > [2023-08-28T22:03:45.864595 15306] Config: (default) inode_cache = true > [2023-08-28T22:03:45.864595 15306] Config: (default) keep_comments_cpp = false > [2023-08-28T22:03:45.864595 15306] Config: (/home/b/.ccache/ccache.conf) log_file = /home/b/.ccache/log.txt > [2023-08-28T22:03:45.864595 15306] Config: (default) max_files = 0 > [2023-08-28T22:03:45.864595 15306] Config: (/home/b/.ccache/ccache.conf) max_size = 5.0 GB > [2023-08-28T22:03:45.864595 15306] Config: (default) msvc_dep_prefix = Note: including file: > [2023-08-28T22:03:45.864595 15306] Config: (default) namespace = > [2023-08-28T22:03:45.864595 15306] Config: (default) path = > [2023-08-28T22:03:45.864595 15306] Config: (default) pch_external_checksum = false > [2023-08-28T22:03:45.864595 15306] Config: (default) prefix_command = > [2023-08-28T22:03:45.864595 15306] Config: (default) prefix_command_cpp = > [2023-08-28T22:03:45.864595 15306] Config: (default) read_only = false > [2023-08-28T22:03:45.864595 15306] Config: (default) read_only_direct = false > [2023-08-28T22:03:45.864595 15306] Config: (default) recache = false > [2023-08-28T22:03:45.864595 15306] Config: (default) remote_only = false > [2023-08-28T22:03:45.864595 15306] Config: (default) remote_storage = > [2023-08-28T22:03:45.864595 15306] Config: (default) reshare = false > [2023-08-28T22:03:45.864595 15306] Config: (default) run_second_cpp = true > [2023-08-28T22:03:45.864595 15306] Config: (default) sloppiness = > [2023-08-28T22:03:45.864595 15306] Config: (default) stats = true > [2023-08-28T22:03:45.864595 15306] Config: (default) stats_log = > [2023-08-28T22:03:45.864595 15306] Config: (default) temporary_dir = /mnt/wslg/runtime-dir/ccache-tmp > [2023-08-28T22:03:45.864595 15306] Config: (default) umask = > [2023-08-28T22:03:45.864615 15306] Command line: /usr/local/bin/ccache /usr/local/cuda/bin/nvcc -forward-unknown-to-host-compiler -DCVAPI_EXPORTS -D_USE_MATH_DEFINES -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/b/build/opencv/cudaimgproc_ccache_log_no_equal/3rdparty/ippicv/ippicv_lnx/icv/include -I/home/b/build/opencv/cudaimgproc_ccache_log_no_equal/3rdparty/ippicv/ippicv_lnx/iw/include -I/home/b/repos/opencv/opencv_contrib/modules/cudaimgproc/include -I/home/b/build/opencv/cudaimgproc_ccache_log_no_equal/modules/cudaimgproc -I/home/b/repos/opencv/opencv_contrib/modules/cudev/include -I/home/b/repos/opencv/opencv/modules/core/include -I/home/b/repos/opencv/opencv/modules/imgproc/include -isystem=/home/b/build/opencv/cudaimgproc_ccache_log_no_equal -isystem=/usr/local/cuda/include -O3 -DNDEBUG --generate-code=arch=compute_86,code=[sm_86] -Xcompiler=-fPIC -D_FORCE_INLINES -Xcompiler=-DCVAPI_EXPORTS -Xcompiler=-fPIC "-Xcompiler= -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Winit-self -Wpointer-arith -Wuninitialized -Wno-comment -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -Wno-undef -Wno-missing-declarations -Wno-shadow -Wno-unused-parameter -Wno-unused-but-set-variable -O3 -DNDEBUG -DNDEBUG" -std=c++14 -MD -MT modules/cudaimgproc/CMakeFiles/opencv_cudaimgproc.dir/src/cuda/mean_shift.cu.o -MF CMakeFiles/opencv_cudaimgproc.dir/src/cuda/mean_shift.cu.o.d -x cu -c /home/b/repos/opencv/opencv_contrib/modules/cudaimgproc/src/cuda/mean_shift.cu -o CMakeFiles/opencv_cudaimgproc.dir/src/cuda/mean_shift.cu.o > [2023-08-28T22:03:45.864621 15306] Hostname: DESKTOP-15JFLGE > [2023-08-28T22:03:45.864622 15306] Working directory: /home/b/build/opencv/cudaimgproc_ccache_log_no_equal/modules/cudaimgproc > [2023-08-28T22:03:45.864626 15306] Compiler: /usr/local/cuda/bin/nvcc > [2023-08-28T22:03:45.864627 15306] Compiler type: nvcc > [2023-08-28T22:03:45.864669 15306] Source file: /home/b/repos/opencv/opencv_contrib/modules/cudaimgproc/src/cuda/mean_shift.cu > [2023-08-28T22:03:45.864672 15306] Dependency file: CMakeFiles/opencv_cudaimgproc.dir/src/cuda/mean_shift.cu.o.d > [2023-08-28T22:03:45.864673 15306] Object file: CMakeFiles/opencv_cudaimgproc.dir/src/cuda/mean_shift.cu.o > [2023-08-28T22:03:45.864686 15306] Trying direct lookup > [2023-08-28T22:03:45.864759 15306] Manifest key: 0a306ovodvo0kmk1ai6mr0su7qe9irr4q > [2023-08-28T22:03:45.864770 15306] Retrieved 0a306ovodvo0kmk1ai6mr0su7qe9irr4q from local storage (/home/b/.ccache/0/a/306ovodvo0kmk1ai6mr0su7qe9irr4qM) > [2023-08-28T22:03:45.865482 15306] Got result key from manifest > [2023-08-28T22:03:45.865486 15306] Result key: 3ca1pd22a6ljrqjipdto1r6janc4uhmd2 > [2023-08-28T22:03:45.865500 15306] Retrieved 3ca1pd22a6ljrqjipdto1r6janc4uhmd2 from local storage (/home/b/.ccache/3/c/a1pd22a6ljrqjipdto1r6janc4uhmd2R) > [2023-08-28T22:03:45.865568 15306] Reading embedded entry #0 .o (52552 bytes) > [2023-08-28T22:03:45.865570 15306] Writing to CMakeFiles/opencv_cudaimgproc.dir/src/cuda/mean_shift.cu.o > [2023-08-28T22:03:45.865598 15306] Reading embedded entry #1 .d (18031 bytes) > [2023-08-28T22:03:45.865599 15306] Writing to CMakeFiles/opencv_cudaimgproc.dir/src/cuda/mean_shift.cu.o.d > [2023-08-28T22:03:45.865617 15306] Succeeded getting cached result > [2023-08-28T22:03:45.865622 15306] Result: direct_cache_hit > [2023-08-28T22:03:45.865623 15306] Result: local_storage_hit > [2023-08-28T22:03:45.865624 15306] Result: local_storage_read_hit > [2023-08-28T22:03:45.865625 15306] Result: local_storage_read_hit > [2023-08-28T22:03:45.865627 15306] Acquiring /home/b/.ccache/c/a/stats.lock > [2023-08-28T22:03:45.865645 15306] Acquired /home/b/.ccache/c/a/stats.lock > [2023-08-28T22:03:45.865647 15306] Creating /home/b/.ccache/c/a/stats.alive > [2023-08-28T22:03:45.865707 15306] Releasing /home/b/.ccache/c/a/stats.lock > [2023-08-28T22:03:45.865715 15306] Unlink /home/b/.ccache/c/a/stats.alive > [2023-08-28T22:03:45.865721 15306] Unlink /home/b/.ccache/c/a/stats.lock > [2023-08-28T22:03:45.865722 15306] Released /home/b/.ccache/c/a/stats.lock > [2023-08-28T22:03:45.865727 15306] Accumulated stats for inode cache: hits=0, misses=0, errors=0 </details> In both cases it seems to work maybe its the version of ccache? Can you get ccache to work on windows for nvcc?