**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:
In your example, you pass the = sign so there is no error. The 2 cases (not working and working) were in may initial comment. An example of a log with the error. It tries to run the preprocessor to get the dependencies and you get `Preprocessor gave exit status 1` then `Failed; falling back to running the real compiler` ``` [2023-08-28T20:10:19.192892 7814 ] Hostname: dgeld-VirtualBox [2023-08-28T20:10:19.192895 7814 ] Working directory: /home/dgeld/src/david/opencv/opencv_cuda/tmp2/opencv/build/modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda [2023-08-28T20:10:19.192902 7814 ] Compiler: /usr/local/cuda-11.4/bin/nvcc [2023-08-28T20:10:19.192905 7814 ] Compiler type: nvcc [2023-08-28T20:10:19.192954 7814 ] ,"-fdata-sections","-Wa,--noexecstack","-fsigned-char","-Wno-psabi","-fsigned-char","-W","-Wall","-Wreturn-type","-Wnon-virtual-dtor","-Waddress","-Wsequence-point","-Wformat","-Wformat-security","-Wmissing-declarations","-Winit-self","-Wpointer-arith","-Wuninitialized","-Wno-comment","-Wno-strict-overflow","-fdiagnostics-show-option","-pthread","-fomit-frame-pointer","-ffunction-sections","-fdata-sections","-fvisibility=hidden","-Wno-undef","-Wno-enum-compare","-Wno-unused-function","-Wno-shadow","-Wno-unused-but-set-variable","-O3","-DNDEBUG","-DNDEBUG" is not a regular file, not considering as input file [2023-08-28T20:10:19.192960 7814 ] arch=compute_72,code=sm_72 is not a regular file, not considering as input file [2023-08-28T20:10:19.192964 7814 ] arch=compute_87,code=sm_87 is not a regular file, not considering as input file [2023-08-28T20:10:19.192971 7814 ] arch=compute_87,code=compute_87 is not a regular file, not considering as input file [2023-08-28T20:10:19.193018 7814 ] Source file: /home/dgeld/src/david/opencv/opencv_cuda/tmp2/opencv/modules/core/src/cuda/gpu_mat.cu [2023-08-28T20:10:19.193021 7814 ] Object file: /home/dgeld/src/david/opencv/opencv_cuda/tmp2/opencv/build/modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/./cuda_compile_1_generated_gpu_mat.cu.o [2023-08-28T20:10:19.193086 7814 ] Hashing CWD /home/dgeld/src/david/opencv/opencv_cuda/tmp2/opencv/build/modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda [2023-08-28T20:10:19.193095 7814 ] Trying direct lookup [2023-08-28T20:10:19.193176 7814 ] Filesystem has less than 100 MiB free space, not using inode cache [2023-08-28T20:10:19.193187 7814 ] Manifest key: 9a7bl7f9sraqg0t6ni9qqpg70njpef1fs [2023-08-28T20:10:19.193197 7814 ] No 9a7bl7f9sraqg0t6ni9qqpg70njpef1fs in local storage [2023-08-28T20:10:19.193326 7814 ] Running preprocessor [2023-08-28T20:10:19.193350 7814 ] Executing /usr/local/cuda-11.4/bin/nvcc -m64 -Xcompiler ,"-fdata-sections","-Wa,--noexecstack","-fsigned-char","-Wno-psabi","-fsigned-char","-W","-Wall","-Wreturn-type","-Wnon-virtual-dtor","-Waddress","-Wsequence-point","-Wformat","-Wformat-security","-Wmissing-declarations","-Winit-self","-Wpointer-arith","-Wuninitialized","-Wno-comment","-Wno-strict-overflow","-fdiagnostics-show-option","-pthread","-fomit-frame-pointer","-ffunction-sections","-fdata-sections","-fvisibility=hidden","-Wno-undef","-Wno-enum-compare","-Wno-unused-function","-Wno-shadow","-Wno-unused-but-set-variable","-O3","-DNDEBUG","-DNDEBUG" -gencode arch=compute_72,code=sm_72 -gencode arch=compute_87,code=sm_87 -gencode arch=compute_87,code=compute_87 -Xcompiler -Xcompiler -fPIC --std=c++14 -ccbin /usr/bin/aarch64-linux-gnu-gcc -D_USE_MATH_DEFINES -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -DOPENCV_ALLOCATOR_STATS_COUNTER_TYPE=int -D__OPENCV_BUILD=1 -D_FORCE_INLINES -DCVAPI_EXPORTS -DNVCC -I/usr/local/cuda-11.4/targets/aarch64-linux/include -I/home/dgeld/src/david/opencv/opencv_cuda/tmp2/opencv/build -I/home/dgeld/src/david/opencv/opencv_cuda/tmp2/opencv/modules/core/include -I/home/dgeld/src/david/opencv/opencv_cuda/tmp2/opencv/build/modules/core -I/home/dgeld/src/david/opencv/opencv_cuda/tmp2/opencv_contrib/modules/cudev/include -I/home/dgeld/src/david/opencv/opencv_cuda/tmp2/opencv/3rdparty/zlib -I/home/dgeld/src/david/opencv/opencv_cuda/tmp2/opencv/build/3rdparty/zlib -E -o /run/user/1000/ccache-tmp/cpp_stdout.tmp.nVpzR1.i /home/dgeld/src/david/opencv/opencv_cuda/tmp2/opencv/modules/core/src/cuda/gpu_mat.cu [2023-08-28T20:10:19.195320 7814 ] Preprocessor gave exit status 1 [2023-08-28T20:10:19.195339 7814 ] Failed; falling back to running the real compiler ```