System cannot find batch file name - VCEnd

Hi i tried to opencv and opencv_contrib with cuda in release configuration. It works
Now In debug it fails. @cudawarped

Cmake output :

-- 'Release' build type is used by default. Use CMAKE_BUILD_TYPE to specify build type (Release or Debug)
-- The CXX compiler identification is MSVC 19.35.32215.0
-- The C compiler identification is MSVC 19.35.32215.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.35.32215/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.35.32215/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detected processor: AMD64
-- Found PythonInterp: C:/Program Files/Python310/python.exe (found suitable version "3.10.10", minimum required is "2.7")
CMake Warning at cmake/OpenCVDetectPython.cmake:81 (message):
  CMake's 'find_host_package(PythonInterp 2.7)' found wrong Python version:

  PYTHON_EXECUTABLE=C:/Program Files/Python310/python.exe

  PYTHON_VERSION_STRING=3.10.10

  Consider providing the 'PYTHON2_EXECUTABLE' variable via CMake command line
  or environment variables

Call Stack (most recent call first):
  cmake/OpenCVDetectPython.cmake:271 (find_python)
  CMakeLists.txt:646 (include)


-- Could NOT find Python2 (missing: Python2_EXECUTABLE Interpreter)
    Reason given by package:
        Interpreter: Wrong major version for the interpreter "C:/Program Files/Python310/python.exe"

-- Found PythonInterp: C:/Program Files/Python310/python.exe (found suitable version "3.10.10", minimum required is "3.2")
-- Found PythonLibs: optimized;C:/Program Files/Python310/libs/python310.lib;debug;C:/Program Files/Python310/libs/python310_d.lib (found suitable exact version "3.10.10")
-- Performing Test HAVE_CXX_FP:PRECISE
-- Performing Test HAVE_CXX_FP:PRECISE - Success
-- Performing Test HAVE_C_FP:PRECISE
-- Performing Test HAVE_C_FP:PRECISE - Success
-- Performing Test HAVE_CPU_SSE3_SUPPORT (check file: cmake/checks/cpu_sse3.cpp)
-- Performing Test HAVE_CPU_SSE3_SUPPORT - Success
-- Performing Test HAVE_CPU_SSSE3_SUPPORT (check file: cmake/checks/cpu_ssse3.cpp)
-- Performing Test HAVE_CPU_SSSE3_SUPPORT - Success
-- Performing Test HAVE_CPU_SSE4_1_SUPPORT (check file: cmake/checks/cpu_sse41.cpp)
-- Performing Test HAVE_CPU_SSE4_1_SUPPORT - Success
-- Performing Test HAVE_CPU_POPCNT_SUPPORT (check file: cmake/checks/cpu_popcnt.cpp)
-- Performing Test HAVE_CPU_POPCNT_SUPPORT - Success
-- Performing Test HAVE_CPU_SSE4_2_SUPPORT (check file: cmake/checks/cpu_sse42.cpp)
-- Performing Test HAVE_CPU_SSE4_2_SUPPORT - Success
-- Performing Test HAVE_CXX_ARCH:AVX (check file: cmake/checks/cpu_fp16.cpp)
-- Performing Test HAVE_CXX_ARCH:AVX - Success
-- Performing Test HAVE_CXX_ARCH:AVX2 (check file: cmake/checks/cpu_avx2.cpp)
-- Performing Test HAVE_CXX_ARCH:AVX2 - Success
-- Performing Test HAVE_CXX_ARCH:AVX512 (check file: cmake/checks/cpu_avx512.cpp)
-- Performing Test HAVE_CXX_ARCH:AVX512 - Success
-- Performing Test HAVE_CPU_BASELINE_FLAGS
-- Performing Test HAVE_CPU_BASELINE_FLAGS - Success
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_SSE4_1
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_SSE4_1 - Success
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_SSE4_2
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_SSE4_2 - Success
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_FP16
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_FP16 - Success
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX - Success
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX2
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX2 - Success
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX512_SKX
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX512_SKX - Success
-- Performing Test HAVE_CXX_W15240
-- Performing Test HAVE_CXX_W15240 - Success
-- Performing Test HAVE_C_W15240
-- Performing Test HAVE_C_W15240 - Success
-- Looking for malloc.h
-- Looking for malloc.h - found
-- Looking for _aligned_malloc
-- Looking for _aligned_malloc - found
-- Found ZLIB: optimized;C:/install/zlib/lib/zlib.lib;debug;C:/install/zlib/lib/zlibd.lib (found suitable version "1.2.13", minimum required is "1.2.3")
-- libjpeg-turbo: VERSION = 2.1.3, BUILD = opencv-4.7.0-dev-libjpeg-turbo
-- Looking for sys/types.h

-- .........- Looking for memalign
-- Looking for memalign - not found
-- OpenJPEG libraries will be built from sources: libopenjp2 (version "2.4.0")
-- Found ZLIB: optimized;C:/install/zlib/lib/zlib.lib;debug;C:/install/zlib/lib/zlibd.lib (found version "1.2.13")
-- Found PNG: optimized;C:/install/libpng/lib/libpng16.lib;debug;C:/install/libpng/lib/libpng16d.lib (found version "1.6.40.git")
-- Looking for C:/install/libpng/include/libpng/png.h
-- Looking for C:/install/libpng/include/libpng/png.h - not found
-- Found TBB (cmake): C:/Program Files (x86)/Intel/oneAPI/tbb/2021.8.0/redist/intel64/vc14/tbb12.dll
-- IPPICV: Downloading ippicv_2020_win_intel64_20191018_general.zip from https://raw.githubusercontent.com/opencv/opencv_3rdparty/a56b6ac6f030c312b2dce17430eef13aed9af274/ippicv/ippicv_2020_win_intel64_20191018_general.zip
-- found Intel IPP (ICV version): 2020.0.0 [2020.0.0 Gold]
-- at: C:/lib/build_cuda/opencv/3rdparty/ippicv/ippicv_win/icv
-- found Intel IPP Integration Wrappers sources: 2020.0.0
-- at: C:/lib/build_cuda/opencv/3rdparty/ippicv/ippicv_win/iw
-- Found CUDNN: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.1/lib/x64/cudnn.lib (found suitable version "8.8.0", minimum required is "7.5")
-- CUDA detected: 12.1
-- CUDA: Using CUDA_ARCH_BIN=8.6
-- CUDA NVCC target flags: -gencode;arch=compute_86,code=sm_86;-D_FORCE_INLINES
-- CUDA: MSVS generator is detected. Disabling CMake re-run checks (CMAKE_SUPPRESS_REGENERATION=ON). You need to run CMake manually if updates are required.
-- Check size of int
-- Check size of int - done
-- Found MKL 2023.0.0 at: C:/Program Files (x86)/Intel/oneAPI/mkl/2023.0.0
-- LAPACK(MKL): LAPACK_LIBRARIES: C:/Program Files (x86)/Intel/oneAPI/mkl/2023.0.0/lib/intel64/mkl_intel_lp64.lib;C:/Program Files (x86)/Intel/oneAPI/mkl/2023.0.0/lib/intel64/mkl_sequential.lib;C:/Program Files (x86)/Intel/oneAPI/mkl/2023.0.0/lib/intel64/mkl_core.lib
-- LAPACK(MKL): Support is enabled.
-- Found apache ant: C:/apache-ant-1.10.13/bin/ant.bat (1.10.13)
-- Found JNI: C:/Program Files/Java/jdk-19/include  found components: AWT JVM
-- Found Pylint: C:/Users/laurent/AppData/Roaming/Python/Python310/Scripts/pylint.exe (found version "2.16.2")
-- Found Flake8: C:/Users/laurent/AppData/Roaming/Python/Python310/Scripts/flake8.exe (found version "6.0.0")
-- Found VTK 9.2.5
-- ADE: Downloading v0.1.2a.zip from https://github.com/opencv/ade/archive/v0.1.2a.zip
-- FFMPEG: Downloading opencv_videoio_ffmpeg.dll from https://raw.githubusercontent.com/opencv/opencv_3rdparty/7dd0d4f1d6fe75f05f3d3b5e38cbc96c1a2d2809/ffmpeg/opencv_videoio_ffmpeg.dll
-- FFMPEG: Downloading opencv_videoio_ffmpeg_64.dll from https://raw.githubusercontent.com/opencv/opencv_3rdparty/7dd0d4f1d6fe75f05f3d3b5e38cbc96c1a2d2809/ffmpeg/opencv_videoio_ffmpeg_64.dll
-- FFMPEG: Downloading ffmpeg_version.cmake from https://raw.githubusercontent.com/opencv/opencv_3rdparty/7dd0d4f1d6fe75f05f3d3b5e38cbc96c1a2d2809/ffmpeg/ffmpeg_version.cmake
-- Looking for mfapi.h
-- Looking for mfapi.h - found
-- Looking for vidcap.h
-- Looking for vidcap.h - found
-- Looking for d3d11_4.h
-- Looking for d3d11_4.h - found
-- freetype2:   NO
-- harfbuzz:    NO
-- Julia not found. Not compiling Julia Bindings.
-- Module opencv_ovis disabled because OGRE3D was not found
-- Found Threads: TRUE
-- Failed to find SuiteSparse - Did not find BLAS library (required for SuiteSparse).
-- Found AMD headers in: C:/install/amd/include
-- Found AMD library: C:/install/AMD/lib/amd.lib
-- Found CAMD headers in: C:/install/amd/include
-- Found CAMD library: C:/install/AMD/lib/amd.lib
-- Found CCOLAMD headers in: C:/install/CCOLAMD/include
-- Found CCOLAMD library: C:/install/CCOLAMD/lib/ccolamd.lib
-- Found CHOLMOD headers in: C:/install/CHOLMOD/include
-- Found CHOLMOD library: C:/install/CHOLMOD/lib/cholmod.lib
-- Found COLAMD headers in: C:/install/COLAMD/include
-- Found COLAMD library: C:/install/COLAMD/lib/colamd.lib
-- Found SPQR headers in: C:/install/SPQR/include
-- Found SPQR library: C:/install/SPQR/lib/spqr.lib
-- Found Config headers in: C:/install/SuiteSparse/include
-- Found Config library: C:/install/SuiteSparse/lib/suitesparseconfig.lib
-- Found Intel Thread Building Blocks (TBB) library (2021.8 / 12080) include location: . Assuming SuiteSparseQR was compiled with TBB.
-- Looking for shm_open in rt
-- Looking for shm_open in rt - not found
-- Could not find librt, but found SuiteSparse_config, assuming that SuiteSparse was compiled without timing.
-- Could NOT find METIS (missing: METIS_INCLUDE_DIR METIS_LIBRARY)
-- Found SuiteSparse: C:/install/amd/include (Required is at least version "7.0.1") found components: AMD CAMD CCOLAMD CHOLMOD COLAMD SPQR Config
-- Found required Ceres dependency: Eigen version 3.4.90 in C:/install/Eigen/share/eigen3/cmake
-- Found required Ceres dependency: glog
-- Found required Ceres dependency: gflags
-- Found Ceres version: 2.2.0 installed in: C:/install/ceres-solver with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, SchurSpecializations]
-- Checking SFM glog/gflags deps... TRUE
-- Tesseract:   YES (ver unknown)
-- Can't use Tesseract (details: https://github.com/opencv/opencv_contrib/pull/2220)
-- Allocator metrics storage type: 'long long'
-- Excluding from source files list: modules/imgproc/src/imgwarp.lasx.cpp
-- Excluding from source files list: modules/imgproc/src/resize.lasx.cpp
-- Registering hook 'INIT_MODULE_SOURCES_opencv_dnn': C:/lib/opencv/modules/dnn/cmake/hooks/INIT_MODULE_SOURCES_opencv_dnn.cmake
-- Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.rvv.cpp
-- Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.lasx.cpp
-- Excluding from source files list: <BUILD>/modules/dnn/int8layers/layers_common.lasx.cpp
-- imgcodecs: OpenEXR codec is disabled in runtime. Details: https://github.com/opencv/opencv/issues/21326
-- highgui: using builtin backend: WIN32UI
-- wechat_qrcode: Downloading detect.caffemodel from https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/a8b69ccc738421293254aec5ddb38bd523503252/detect.caffemodel
-- wechat_qrcode: Downloading detect.prototxt from https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/a8b69ccc738421293254aec5ddb38bd523503252/detect.prototxt
-- wechat_qrcode: Downloading sr.caffemodel from https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/a8b69ccc738421293254aec5ddb38bd523503252/sr.caffemodel
-- wechat_qrcode: Downloading sr.prototxt from https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/a8b69ccc738421293254aec5ddb38bd523503252/sr.prototxt
-- xfeatures2d/boostdesc: Downloading boostdesc_bgm.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm.i
-- xfeatures2d/boostdesc: Downloading boostdesc_bgm_bi.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_bi.i
-- xfeatures2d/boostdesc: Downloading boostdesc_bgm_hd.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_hd.i
-- xfeatures2d/boostdesc: Downloading boostdesc_binboost_064.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_064.i
-- xfeatures2d/boostdesc: Downloading boostdesc_binboost_128.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_128.i
-- xfeatures2d/boostdesc: Downloading boostdesc_binboost_256.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_256.i
-- xfeatures2d/boostdesc: Downloading boostdesc_lbgm.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_lbgm.i
-- xfeatures2d/vgg: Downloading vgg_generated_48.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_48.i
-- xfeatures2d/vgg: Downloading vgg_generated_64.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_64.i
-- xfeatures2d/vgg: Downloading vgg_generated_80.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_80.i
-- xfeatures2d/vgg: Downloading vgg_generated_120.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_120.i
-- data: Downloading face_landmark_model.dat from https://raw.githubusercontent.com/opencv/opencv_3rdparty/8afa57abc8229d611c4937165d20e2a2d9fc5a12/face_landmark_model.dat
-- Failed to find SuiteSparse - Did not find BLAS library (required for SuiteSparse).
-- Found AMD headers in: C:/install/amd/include
-- Found AMD library: C:/install/AMD/lib/amd.lib
-- Found CAMD headers in: C:/install/amd/include
-- Found CAMD library: C:/install/AMD/lib/amd.lib
-- Found CCOLAMD headers in: C:/install/CCOLAMD/include
-- Found CCOLAMD library: C:/install/CCOLAMD/lib/ccolamd.lib
-- Found CHOLMOD headers in: C:/install/CHOLMOD/include
-- Found CHOLMOD library: C:/install/CHOLMOD/lib/cholmod.lib
-- Found COLAMD headers in: C:/install/COLAMD/include
-- Found COLAMD library: C:/install/COLAMD/lib/colamd.lib
-- Found SPQR headers in: C:/install/SPQR/include
-- Found SPQR library: C:/install/SPQR/lib/spqr.lib
-- Found Config headers in: C:/install/SuiteSparse/include
-- Found Config library: C:/install/SuiteSparse/lib/suitesparseconfig.lib
-- Found Intel Thread Building Blocks (TBB) library (2021.8 / 12080) include location: . Assuming SuiteSparseQR was compiled with TBB.
-- Could not find librt, but found SuiteSparse_config, assuming that SuiteSparse was compiled without timing.
-- Could NOT find METIS (missing: METIS_INCLUDE_DIR METIS_LIBRARY)
-- Found required Ceres dependency: Eigen version 3.4.90 in C:/install/Eigen/share/eigen3/cmake
-- Found required Ceres dependency: glog
-- Found required Ceres dependency: gflags
-- Found Ceres version: 2.2.0 installed in: C:/install/ceres-solver with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, SchurSpecializations]
-- NVIDIA_OPTICAL_FLOW: Downloading edb50da3cf849840d680249aa6dbef248ebce2ca.zip from https://github.com/NVIDIA/NVIDIAOpticalFlowSDK/archive/edb50da3cf849840d680249aa6dbef248ebce2ca.zip
-- Building with NVIDIA Optical Flow API 2.0
-- Found 'misc' Python modules from C:/lib/opencv/modules/python/package/extra_modules
-- Found 'mat_wrapper;utils' Python modules from C:/lib/opencv/modules/core/misc/python/package
-- Found 'gapi' Python modules from C:/lib/opencv/modules/gapi/misc/python/package
-- Found 'misc' Python modules from C:/lib/opencv/modules/python/package/extra_modules
-- Found 'mat_wrapper;utils' Python modules from C:/lib/opencv/modules/core/misc/python/package
-- Found 'gapi' Python modules from C:/lib/opencv/modules/gapi/misc/python/package
-- DNNL_CONFIGURATION is unset, defaulting to cpu_dpcpp_gpu_dpcpp
-- DNNL_CONFIGURATION: cpu_dpcpp_gpu_dpcpp
-- SYCL/OpenCL samples are skipped: SYCL SDK is required
--    - check configuration of SYCL_DIR/SYCL_ROOT/CMAKE_MODULE_PATH
--    - ensure that right compiler is selected from SYCL SDK (e.g, clang++): CMAKE_CXX_COMPILER=C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.35.32215/bin/Hostx64/x64/cl.exe
-- Registered 'check_pylint' target: using C:/Users/laurent/AppData/Roaming/Python/Python310/Scripts/pylint.exe (ver: 2.16.2), checks: 191
-- Registered 'check_flake8' target: using C:/Users/laurent/AppData/Roaming/Python/Python310/Scripts/flake8.exe (ver: 6.0.0)
CMake Warning at cmake/OpenCVGenSetupVars.cmake:54 (message):
  CONFIGURATION IS NOT SUPPORTED: validate setupvars script in install
  directory
Call Stack (most recent call first):
  CMakeLists.txt:1063 (include)


--
-- General configuration for OpenCV 4.7.0-dev =====================================
--   Version control:               4.7.0-86-g6c235c8edb
--
--   Extra modules:
--     Location (extra):            C:/lib/opencv_contrib/modules
--     Version control (extra):     4.7.0-23-ged1873bc-dirty
--
--   Platform:
--     Timestamp:                   2023-03-06T16:50:45Z
--     Host:                        Windows 10.0.22621 AMD64
--     CMake:                       3.26.0-rc4
--     CMake generator:             Visual Studio 17 2022
--     CMake build tool:            C:/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin/amd64/MSBuild.exe
--     MSVC:                        1935
--     Configuration:               Debug Release
--
--   CPU/HW features:
--     Baseline:                    SSE SSE2 SSE3
--       requested:                 SSE3
--     Dispatched code generation:  SSE4_1 SSE4_2 FP16 AVX AVX2 AVX512_SKX
--       requested:                 SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
--       SSE4_1 (18 files):         + SSSE3 SSE4_1
--       SSE4_2 (2 files):          + SSSE3 SSE4_1 POPCNT SSE4_2
--       FP16 (1 files):            + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
--       AVX (5 files):             + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
--       AVX2 (34 files):           + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
--       AVX512_SKX (8 files):      + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_COMMON AVX512_SKX
--
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++ standard:                11
--     C++ Compiler:                C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.35.32215/bin/Hostx64/x64/cl.exe  (ver 19.35.32215.0)
--     C++ flags (Release):         /DWIN32 /D_WINDOWS /W4 /GR  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise     /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819 /MP  /MD /O2 /Ob2 /DNDEBUG
--     C++ flags (Debug):           /DWIN32 /D_WINDOWS /W4 /GR  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise     /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819 /MP  /MDd /Zi /Ob0 /Od /RTC1
--     C Compiler:                  C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.35.32215/bin/Hostx64/x64/cl.exe
--     C flags (Release):           /DWIN32 /D_WINDOWS /W3  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise     /MP   /MD /O2 /Ob2 /DNDEBUG
--     C flags (Debug):             /DWIN32 /D_WINDOWS /W3  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise     /MP /MDd /Zi /Ob0 /Od /RTC1
--     Linker flags (Release):      /machine:x64  /INCREMENTAL:NO
--     Linker flags (Debug):        /machine:x64  /debug /INCREMENTAL
--     ccache:                      NO
--     Precompiled headers:         YES
--     Extra dependencies:          cudart_static.lib nppc.lib nppial.lib nppicc.lib nppidei.lib nppif.lib nppig.lib nppim.lib nppist.lib nppisu.lib nppitc.lib npps.lib cublas.lib cudnn.lib cufft.lib -LIBPATH:C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.1/lib/x64
--     3rdparty dependencies:
--
--   OpenCV modules:
--     To be built:                 alphamat aruco barcode bgsegm bioinspired calib3d ccalib core cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev datasets dnn dnn_objdetect dnn_superres dpm face features2d flann fuzzy gapi hfs highgui img_hash imgcodecs imgproc intensity_transform java line_descriptor mcc ml objdetect optflow phase_unwrapping photo plot python3 quality rapid reg rgbd saliency sfm shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab viz wechat_qrcode xfeatures2d ximgproc xobjdetect xphoto
--     Disabled:                    world
--     Disabled by dependency:      -
--     Unavailable:                 cvv freetype hdf julia matlab ovis python2
--     Applications:                tests perf_tests examples apps
--     Documentation:               NO
--     Non-free algorithms:         YES
--
--   Windows RT support:            NO
--
--   GUI:                           WIN32UI
--     Win32 UI:                    YES
--     OpenGL support:              YES (opengl32 glu32)
--     VTK support:                 YES (ver 9.2.5)
--
--   Media I/O:
--     ZLib:                        optimized C:/install/zlib/lib/zlib.lib debug C:/install/zlib/lib/zlibd.lib (ver 1.2.13)
--     JPEG:                        build-libjpeg-turbo (ver 2.1.3-62)
--       SIMD Support Request:      YES
--       SIMD Support:              NO
--     WEBP:                        build (ver encoder: 0x020f)
--     PNG:                         optimized C:/install/libpng/lib/libpng16.lib debug C:/install/libpng/lib/libpng16d.lib (ver 1.6.40)
--     TIFF:                        build (ver 42 - 4.2.0)
--     JPEG 2000:                   build (ver 2.4.0)
--     OpenEXR:                     build (ver 2.3.0)
--     HDR:                         YES
--     SUNRASTER:                   YES
--     PXM:                         YES
--     PFM:                         YES
--
--   Video I/O:
--     DC1394:                      NO
--     FFMPEG:                      YES (prebuilt binaries)
--       avcodec:                   YES (58.134.100)
--       avformat:                  YES (58.76.100)
--       avutil:                    YES (56.70.100)
--       swscale:                   YES (5.9.100)
--       avresample:                YES (4.0.0)
--     GStreamer:                   NO
--     DirectShow:                  YES
--     Media Foundation:            YES
--       DXVA:                      YES
--
--   Parallel framework:            TBB (ver 2021.8 interface 12080)
--
--   Other third-party libraries:
--     Intel IPP:                   2020.0.0 Gold [2020.0.0]
--            at:                   C:/lib/build_cuda/opencv/3rdparty/ippicv/ippicv_win/icv
--     Intel IPP IW:                sources (2020.0.0)
--               at:                C:/lib/build_cuda/opencv/3rdparty/ippicv/ippicv_win/iw
--     Lapack:                      YES (C:/Program Files (x86)/Intel/oneAPI/mkl/2023.0.0/lib/intel64/mkl_intel_lp64.lib C:/Program Files (x86)/Intel/oneAPI/mkl/2023.0.0/lib/intel64/mkl_sequential.lib C:/Program Files (x86)/Intel/oneAPI/mkl/2023.0.0/lib/intel64/mkl_core.lib)
--     Eigen:                       YES (ver ..)
--     Custom HAL:                  NO
--     Protobuf:                    build (3.19.1)
--
--   NVIDIA CUDA:                   YES (ver 12.1, CUFFT CUBLAS)
--     NVIDIA GPU arch:             86
--     NVIDIA PTX archs:
--
--   cuDNN:                         YES (ver 8.8.0)
--
--   OpenCL:                        YES (NVD3D11)
--     Include path:                C:/lib/opencv/3rdparty/include/opencl/1.2
--     Link libraries:              Dynamic load
--
--   Python 3:
--     Interpreter:                 C:/Program Files/Python310/python.exe (ver 3.10.10)
--     Libraries:                   optimized C:/Program Files/Python310/libs/python310.lib debug C:/Program Files/Python310/libs/python310_d.lib (ver 3.10.10)
--     numpy:                       C:/Users/laurent/AppData/Roaming/Python/Python310/site-packages/numpy/core/include (ver 1.24.2)
--     install path:                C:/Users/laurent/AppData/Roaming/Python/Python310/site-packages/cv2/python-3.10
--
--   Python (for build):            C:/Program Files/Python310/python.exe
--
--   Java:
--     ant:                         C:/apache-ant-1.10.13/bin/ant.bat (ver 1.10.13)
--     JNI:                         C:/Program Files/Java/jdk-19/include C:/Program Files/Java/jdk-19/include/win32 C:/Program Files/Java/jdk-19/include
--     Java wrappers:               YES
--     Java tests:                  YES
--
--   Install to:                    C:/install/cuda/opencv
-- -----------------------------------------------------------------
--
-- Configuring done (55.6s)
-- Generating done (6.9s)

full output is here

First error is (sorry it’s in french) is dnn module

2>Building NVCC (Device) object modules/dnn/CMakeFiles/cuda_compile_1.dir/src/cuda/debug/cuda_compile_1_generated_activation_eltwise.cu.obj
  3>Building NVCC (Device) object modules/dnn/CMakeFiles/cuda_compile_1.dir/src/cuda/debug/cuda_compile_1_generated_activations.cu.obj
  1>Processing OpenCL kernels (dnn)
  5>Building NVCC (Device) object modules/dnn/CMakeFiles/cuda_compile_1.dir/src/cuda/debug/cuda_compile_1_generated_bias_activation_eltwise.cu.obj
  23>Building NVCC (Device) object modules/dnn/CMakeFiles/cuda_compile_1.dir/src/cuda/debug/cuda_compile_1_generated_roi_pooling.cu.obj
  6>Building NVCC (Device) object modules/dnn/CMakeFiles/cuda_compile_1.dir/src/cuda/debug/cuda_compile_1_generated_bias_eltwise_activation.cu.obj
  12>Building NVCC (Device) object modules/dnn/CMakeFiles/cuda_compile_1.dir/src/cuda/debug/cuda_compile_1_generated_fill_copy.cu.obj
  7>Building NVCC (Device) object modules/dnn/CMakeFiles/cuda_compile_1.dir/src/cuda/debug/cuda_compile_1_generated_concat.cu.obj
  4>Building NVCC (Device) object modules/dnn/CMakeFiles/cuda_compile_1.dir/src/cuda/debug/cuda_compile_1_generated_bias_activation.cu.obj
  13>Building NVCC (Device) object modules/dnn/CMakeFiles/cuda_compile_1.dir/src/cuda/debug/cuda_compile_1_generated_fp_conversion.cu.obj
  26>Building NVCC (Device) object modules/dnn/CMakeFiles/cuda_compile_1.dir/src/cuda/debug/cuda_compile_1_generated_slice.cu.obj
  17>Building NVCC (Device) object modules/dnn/CMakeFiles/cuda_compile_1.dir/src/cuda/debug/cuda_compile_1_generated_normalize.cu.obj
  14>Building NVCC (Device) object modules/dnn/CMakeFiles/cuda_compile_1.dir/src/cuda/debug/cuda_compile_1_generated_grid_nms.cu.obj
  24>Building NVCC (Device) object modules/dnn/CMakeFiles/cuda_compile_1.dir/src/cuda/debug/cuda_compile_1_generated_scale_shift.cu.obj
  10>Building NVCC (Device) object modules/dnn/CMakeFiles/cuda_compile_1.dir/src/cuda/debug/cuda_compile_1_generated_eltwise_activation.cu.obj
  22>Building NVCC (Device) object modules/dnn/CMakeFiles/cuda_compile_1.dir/src/cuda/debug/cuda_compile_1_generated_resize.cu.obj
  15>Building NVCC (Device) object modules/dnn/CMakeFiles/cuda_compile_1.dir/src/cuda/debug/cuda_compile_1_generated_max_unpooling.cu.obj
  25>Building NVCC (Device) object modules/dnn/CMakeFiles/cuda_compile_1.dir/src/cuda/debug/cuda_compile_1_generated_shortcut.cu.obj
  8>Building NVCC (Device) object modules/dnn/CMakeFiles/cuda_compile_1.dir/src/cuda/debug/cuda_compile_1_generated_crop_and_resize.cu.obj
  9>Building NVCC (Device) object modules/dnn/CMakeFiles/cuda_compile_1.dir/src/cuda/debug/cuda_compile_1_generated_detection_output.cu.obj
  16>Building NVCC (Device) object modules/dnn/CMakeFiles/cuda_compile_1.dir/src/cuda/debug/cuda_compile_1_generated_mvn.cu.obj
  18>Building NVCC (Device) object modules/dnn/CMakeFiles/cuda_compile_1.dir/src/cuda/debug/cuda_compile_1_generated_padding.cu.obj
  19>Building NVCC (Device) object modules/dnn/CMakeFiles/cuda_compile_1.dir/src/cuda/debug/cuda_compile_1_generated_permute.cu.obj
  11>Building NVCC (Device) object modules/dnn/CMakeFiles/cuda_compile_1.dir/src/cuda/debug/cuda_compile_1_generated_eltwise_ops.cu.obj
  20>Building NVCC (Device) object modules/dnn/CMakeFiles/cuda_compile_1.dir/src/cuda/debug/cuda_compile_1_generated_prior_box.cu.obj
  21>Building NVCC (Device) object modules/dnn/CMakeFiles/cuda_compile_1.dir/src/cuda/debug/cuda_compile_1_generated_region.cu.obj
  roi_pooling.cu
  bias_activation_eltwise.cu
  activations.cu
  bias_eltwise_activation.cu
  activation_eltwise.cu
  concat.cu
  fill_copy.cu
  fp_conversion.cu
  normalize.cu
  slice.cu
  bias_activation.cu
  max_unpooling.cu
  detection_output.cu
  prior_box.cu
  mvn.cu
  crop_and_resize.cu
  grid_nms.cu
  scale_shift.cu
  permute.cu
  resize.cu
  region.cu
  eltwise_ops.cu
  shortcut.cu
  padding.cu
  eltwise_activation.cu
  fill_copy.cu
  fp_conversion.cu
  tmpxft_00002790_00000000-10_fp_conversion.cudafe1.cpp
C:\Users\laurent\AppData\Local\Temp\tmpxft_00002790_00000000-10_fp_conversion.cudafe1.cpp : fatal error C1041: impossible d'ouvrir la base de donn├®es du programme 'C:\lib\build_cuda\opencv\modules\dnn\CMakeFiles\cuda_compile_1.dir\src\cuda\vc140.pdb'┬á; si plusieurs CL.EXE ├®crivent dans le m├¬me fichier .PDB, utilisez /FS. [C:\lib\build_cuda\opencv\modules\dnn\opencv_dnn.vcxproj]
  CMake Error at cuda_compile_1_generated_fp_conversion.cu.obj.Debug.cmake:280 (message):
    Error generating file
    C:/lib/build_cuda/opencv/modules/dnn/CMakeFiles/cuda_compile_1.dir/src/cuda/debug/cuda_compile_1_generated_fp_conversion.cu.obj


  Le système ne trouve pas le nom de fichier de commandes - VCEnd
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(230,5): error MSB8066: la build personnalisée de 'C:\lib\opencv\modules\dnn\src\cuda\fp_conversion.cu' s'est arrêtée. Code 1. [C:\lib\build_cuda\opencv\modules\dnn\opencv_dnn.vcxproj]
  concat.cu
  tmpxft_000007e8_00000000-10_concat.cudafe1.cpp
C:\Users\laurent\AppData\Local\Temp\tmpxft_000007e8_00000000-10_concat.cudafe1.cpp : fatal error C1041: impossible d'ouvrir la base de donn├®es du programme 'C:\lib\build_cuda\opencv\modules\dnn\CMakeFiles\cuda_compile_1.dir\src\cuda\vc140.pdb'┬á; si plusieurs CL.EXE ├®crivent dans le m├¬me fichier .PDB, utilisez /FS. [C:\lib\build_cuda\opencv\modules\dnn\opencv_dnn.vcxproj]
  normalize.cu
  CMake Error at cuda_compile_1_generated_concat.cu.obj.Debug.cmake:280 (message):
    Error generating file
    C:/lib/build_cuda/opencv/modules/dnn/CMakeFiles/cuda_compile_1.dir/src/cuda/debug/cuda_compile_1_generated_concat.cu.obj


  Le système ne trouve pas le nom de fichier de commandes - VCEnd

Someone else had this problem

Apparently changing the version of CMake fixed it, I must admit I thought they just needed to delete their build directory and start again as I couldn’t recreate the issue but maybe there was something to it.

If switching the version of CMake doesn’t work let me know your full config and I’ll take a look tomorrow.

1 Like

Now I’m looking at it it could be CMake your both using the latest release candidates. I only tried stable builds of CMake.

I delete my build folder and it’s always same problem :

Rebuild started...
1>------ Rebuild All started: Project: opencv_cudaarithm, Configuration: Debug x64 ------
1>10>Building NVCC (Device) object modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/Debug/cuda_compile_1_generated_copy_make_border.cu.obj
1>9>Building NVCC (Device) object modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/Debug/cuda_compile_1_generated_cmp_scalar.cu.obj
1>12>Building NVCC (Device) object modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/Debug/cuda_compile_1_generated_div_mat.cu.obj
1>2>Building NVCC (Device) object modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/Debug/cuda_compile_1_generated_absdiff_scalar.cu.obj
1>13>Building NVCC (Device) object modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/Debug/cuda_compile_1_generated_div_scalar.cu.obj
1>11>Building NVCC (Device) object modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/Debug/cuda_compile_1_generated_countnonzero.cu.obj
1>8>Building NVCC (Device) object modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/Debug/cuda_compile_1_generated_cmp_mat.cu.obj
1>6>Building NVCC (Device) object modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/Debug/cuda_compile_1_generated_bitwise_mat.cu.obj
1>14>Building NVCC (Device) object modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/Debug/cuda_compile_1_generated_in_range.cu.obj
1>1>Building NVCC (Device) object modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/Debug/cuda_compile_1_generated_absdiff_mat.cu.obj
1>16>Building NVCC (Device) object modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/Debug/cuda_compile_1_generated_lut.cu.obj
1>15>Building NVCC (Device) object modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/Debug/cuda_compile_1_generated_integral.cu.obj
1>7>Building NVCC (Device) object modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/Debug/cuda_compile_1_generated_bitwise_scalar.cu.obj
1>3>Building NVCC (Device) object modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/Debug/cuda_compile_1_generated_add_mat.cu.obj
1>17>Building NVCC (Device) object modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/Debug/cuda_compile_1_generated_math.cu.obj
1>25>Building NVCC (Device) object modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/Debug/cuda_compile_1_generated_normalize.cu.obj
1>div_mat.cu
1>absdiff_scalar.cu
1>copy_make_border.cu
1>countnonzero.cu
1>cmp_scalar.cu
1>div_scalar.cu
1>cmp_mat.cu
1>in_range.cu
1>lut.cu
1>bitwise_mat.cu
1>bitwise_scalar.cu
1>add_mat.cu
1>absdiff_mat.cu
1>integral.cu
1>math.cu
1>normalize.cu
1>absdiff_scalar.cu
1>absdiff_mat.cu
1>lut.cu
1>tmpxft_00006614_00000000-10_absdiff_mat.cudafe1.cpp
1>tmpxft_00003b98_00000000-10_lut.cudafe1.cpp
1>C:\Users\laurent\AppData\Local\Temp\tmpxft_00006614_00000000-10_absdiff_mat.cudafe1.cpp : fatal error C1041: cannot open program database 'C:\lib\build_cuda\opencv\modules\cudaarithm\CMakeFiles\cuda_compile_1.dir\src\cuda\vc140.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS
1>C:\Users\laurent\AppData\Local\Temp\tmpxft_00003b98_00000000-10_lut.cudafe1.cpp : fatal error C1041: cannot open program database 'C:\lib\build_cuda\opencv\modules\cudaarithm\CMakeFiles\cuda_compile_1.dir\src\cuda\vc140.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS
1>CMake Error at cuda_compile_1_generated_absdiff_mat.cu.obj.Debug.cmake:280 (message):
1>  Error generating file
1>  C:/lib/build_cuda/opencv/modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/Debug/cuda_compile_1_generated_absdiff_mat.cu.obj
1>
1>
1>CMake Error at cuda_compile_1_generated_lut.cu.obj.Debug.cmake:280 (message):
1>  Error generating file
1>  C:/lib/build_cuda/opencv/modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/Debug/cuda_compile_1_generated_lut.cu.obj
1>
1>
1>Le système ne trouve pas le nom de fichier de commandes - VCEnd
1>Le système ne trouve pas le nom de fichier de commandes - VCEnd
1>minmax.cu
1>18>Building NVCC (Device) object modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/Debug/cuda_compile_1_generated_minmax.cu.obj
1>polar_cart.cu
1>26>Building NVCC (Device) object modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/Debug/cuda_compile_1_generated_polar_cart.cu.obj
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(230,5): error MSB8066: Custom build for 'C:\lib\opencv_contrib\modules\cudaarithm\src\cuda\absdiff_mat.cu' exited with code 1.
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(230,5): error MSB8066: Custom build for 'C:\lib\opencv_contrib\modules\cudaarithm\src\cuda\lut.cu' exited with code 1.
1>countnonzero.cu
1>cmp_mat.cu
1>tmpxft_00002018_00000000-10_cmp_mat.cudafe1.cpp
1>C:\Users\laurent\AppData\Local\Temp\tmpxft_00002018_00000000-10_cmp_mat.cudafe1.cpp : fatal error C1041: cannot open program database 'C:\lib\build_cuda\opencv\modules\cudaarithm\CMakeFiles\cuda_compile_1.dir\src\cuda\vc140.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS
1

CMake Error at cuda_compile_1_generated_cmp_mat.cu.obj.Debug.cmake:280 (message):

I tried to use /FS option but problem is still here

Did you add it to the -Xcompiler options as this seemed to work for me?

See my update on the issue, for me it dissapears without modifying the CMake script if I use a stable build of CMake, the ninja genereator or a Release build.

No it does not work
Full option used are

/X /Yu"C:/lib/build_cuda/opencv/modules/cudaarithm/CMakeFiles/opencv_cudaarithm.dir/Debug/cmake_pch.hxx" /MP /ifcOutput “opencv_cudaarithm.dir\Debug" /GS /W4 /wd"4127” /wd"4251" /wd"4324" /wd"4275" /wd"4512" /wd"4589" /wd"4819" /Gy /Zc:wchar_t /I"C:\lib\build_cuda\opencv\3rdparty\ippicv\ippicv_win\icv\include" /I"C:\lib\build_cuda\opencv\3rdparty\ippicv\ippicv_win\iw\include" /I"C:\lib\opencv_contrib\modules\cudaarithm\src" /I"C:\lib\opencv_contrib\modules\cudaarithm\include" /I"C:\lib\build_cuda\opencv\modules\cudaarithm" /I"C:\lib\opencv_contrib\modules\cudev\include" /I"C:\lib\opencv\modules\core\include" /I"C:\lib\opencv\modules\ts\include" /I"C:\lib\opencv\modules\imgcodecs\include" /I"C:\lib\opencv\modules\videoio\include" /I"C:\lib\opencv\modules\imgproc\include" /I"C:\lib\opencv\modules\highgui\include" /Zi /Gm- /Od /Ob0 /Fd"C:\lib\build_cuda\opencv\lib\Debug\opencv_cudaarithm470d.pdb" /Zc:inline /fp:precise /external:W0 /D “_WINDLL” /D “_MBCS” /D “WIN32” /D “_WINDOWS” /D “_CRT_SECURE_NO_DEPRECATE” /D “_CRT_NONSTDC_NO_DEPRECATE” /D “_SCL_SECURE_NO_WARNINGS” /D “_VARIADIC_MAX=10” /D “_WIN32_WINNT=0x0601” /D “_USE_MATH_DEFINES” /D “__STDC_CONSTANT_MACROS” /D “__STDC_LIMIT_MACROS” /D “__STDC_FORMAT_MACROS” /D “__OPENCV_BUILD=1” /D “CMAKE_INTDIR="Debug"” /D “CVAPI_EXPORTS” /errorReport:prompt /WX- /Zc:forScope /RTC1 /GR /Gd /Oi /MDd /Fa"opencv_cudaarithm.dir\Debug" /EHa /nologo /Fo"opencv_cudaarithm.dir\Debug" /Fp"C:/lib/build_cuda/opencv/modules/cudaarithm/opencv_cudaarithm.dir/Debug/cmake_pch.pch" /diagnostics:column

and additional options
%(AdditionalOptions) /external:I /FS “C:/lib/build_cuda/opencv” /external:I “C:/Program Files (x86)/Intel/oneAPI/mkl/2023.0.0/include” /external:I “C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.1/include” /external:I “C:/install/eigen/include/eigen3” /bigobj

1 Like

Wait and see C1041 cannot open program database if multiple CL.EXE write to the same .PDB file (#24576) · Issues · CMake / CMake · GitLab

Your right I was mistaken and must have been building it with the stable version of CMake.

Can you post msvc options and and additional options?
If it is a cmake bug I think that if I use your option it must solve the problem.

I can’t get it to work with CMake 3.26 releasse candidates (rc). I had to use the latest stable release (3.25.2) or the ninja generator, have you tried to build with CMake 3.25.2?

I think it will work with 3.25.2.
But there is a bug in 3.26rc it will be better to find it and send cmake team before 3.26 version : that’s opensource :slight_smile:

It looks like I was wrong with this as I was trying to build a single .cu file in VS which also fails on CMake 3.25.2.

As CUDA is not a first class language I would guess that changes here don’t propicate to NVCC for me adding the /FS option to the cmake build scripts seems to solve the issue.

Can you try adding these patches to see if it fixes the issue for you

I didn’t see any errors with the following CMake arguments

set "openCvSource=D:/repos/opencv/opencv"
set "openCVExtraModules=D:/repos/opencv/contrib/modules/"
set "openCvBuild=D:/build/opencv/is/23280_3_2_6_vs_min"
set "generator=Visual Studio 17 2022"
"D:\bin\cmake\cmake-3.26.0-rc5-windows-x86_64\bin\cmake.exe" -B"%openCvBuild%/" -H"%openCvSource%/" -G"%generator%" -DOPENCV_EXTRA_MODULES_PATH="%openCVExtraModules%/" ^
-DBUILD_opencv_world=OFF ^
-DWITH_CUDA=ON  -DCUDA_ARCH_BIN=8.6
CMake Config/Gen Output
-- 'Release' build type is used by default. Use CMAKE_BUILD_TYPE to specify build type (Release or Debug)
-- The CXX compiler identification is MSVC 19.34.31937.0
-- The C compiler identification is MSVC 19.34.31937.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detected processor: AMD64
-- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.7")
-- Found PythonInterp: C:/Users/b/mambaforge/python.exe (found suitable version "3.9.13", minimum required is "3.2")
-- Could NOT find PythonLibs: Found unsuitable version "3.9.7", but required is exact version "3.9.13" (found C:/Program Files (x86)/Microsoft Visual Studio/Shared/Python39_64/libs/python39.lib)
<string>:1: DeprecationWarning:

  `numpy.distutils` is deprecated since NumPy 1.23.0, as a result
  of the deprecation of `distutils` itself. It will be removed for
  Python >= 3.12. For older Python versions it will remain present.
  It is recommended to use `setuptools < 60.0` for those Python versions.
  For more details, see:
    https://numpy.org/devdocs/reference/distutils_status_migration.html


-- Performing Test HAVE_CXX_FP:PRECISE
-- Performing Test HAVE_CXX_FP:PRECISE - Success
-- Performing Test HAVE_C_FP:PRECISE
-- Performing Test HAVE_C_FP:PRECISE - Success
-- Performing Test HAVE_CPU_SSE3_SUPPORT (check file: cmake/checks/cpu_sse3.cpp)
-- Performing Test HAVE_CPU_SSE3_SUPPORT - Success
-- Performing Test HAVE_CPU_SSSE3_SUPPORT (check file: cmake/checks/cpu_ssse3.cpp)
-- Performing Test HAVE_CPU_SSSE3_SUPPORT - Success
-- Performing Test HAVE_CPU_SSE4_1_SUPPORT (check file: cmake/checks/cpu_sse41.cpp)
-- Performing Test HAVE_CPU_SSE4_1_SUPPORT - Success
-- Performing Test HAVE_CPU_POPCNT_SUPPORT (check file: cmake/checks/cpu_popcnt.cpp)
-- Performing Test HAVE_CPU_POPCNT_SUPPORT - Success
-- Performing Test HAVE_CPU_SSE4_2_SUPPORT (check file: cmake/checks/cpu_sse42.cpp)
-- Performing Test HAVE_CPU_SSE4_2_SUPPORT - Success
-- Performing Test HAVE_CXX_ARCH:AVX (check file: cmake/checks/cpu_fp16.cpp)
-- Performing Test HAVE_CXX_ARCH:AVX - Success
-- Performing Test HAVE_CXX_ARCH:AVX2 (check file: cmake/checks/cpu_avx2.cpp)
-- Performing Test HAVE_CXX_ARCH:AVX2 - Success
-- Performing Test HAVE_CXX_ARCH:AVX512 (check file: cmake/checks/cpu_avx512.cpp)
-- Performing Test HAVE_CXX_ARCH:AVX512 - Success
-- Performing Test HAVE_CPU_BASELINE_FLAGS
-- Performing Test HAVE_CPU_BASELINE_FLAGS - Success
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_SSE4_1
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_SSE4_1 - Success
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_SSE4_2
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_SSE4_2 - Success
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_FP16
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_FP16 - Success
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX - Success
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX2
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX2 - Success
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX512_SKX
-- Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX512_SKX - Success
-- Performing Test HAVE_CXX_W15240
-- Performing Test HAVE_CXX_W15240 - Success
-- Performing Test HAVE_C_W15240
-- Performing Test HAVE_C_W15240 - Success
-- Looking for malloc.h
-- Looking for malloc.h - found
-- Looking for _aligned_malloc
-- Looking for _aligned_malloc - found
-- Looking for fseeko
-- Looking for fseeko - not found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of off64_t
-- Check size of off64_t - failed
-- libjpeg-turbo: VERSION = 2.1.3, BUILD = opencv-4.7.0-libjpeg-turbo
-- Check size of size_t
-- Check size of size_t - done
-- Check size of unsigned long
-- Check size of unsigned long - done
-- Looking for include file intrin.h
-- Looking for include file intrin.h - found
-- Looking for a ASM_NASM compiler
-- Looking for a ASM_NASM compiler - NOTFOUND
-- libjpeg-turbo(SIMD): SIMD extensions disabled: could not find NASM compiler.  Performance will suffer.
-- Looking for assert.h
-- Looking for assert.h - found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for io.h
-- Looking for io.h - found
-- Looking for limits.h
-- Looking for limits.h - found
-- Looking for memory.h
-- Looking for memory.h - found
-- Looking for search.h
-- Looking for search.h - found
-- Looking for string.h
-- Looking for string.h - found
-- Performing Test C_HAS_inline
-- Performing Test C_HAS_inline - Success
-- Check size of signed short
-- Check size of signed short - done
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Check size of signed int
-- Check size of signed int - done
-- Check size of unsigned int
-- Check size of unsigned int - done
-- Check size of signed long
-- Check size of signed long - done
-- Check size of signed long long
-- Check size of signed long long - done
-- Check size of unsigned long long
-- Check size of unsigned long long - done
-- Check size of unsigned char *
-- Check size of unsigned char * - done
-- Check size of ptrdiff_t
-- Check size of ptrdiff_t - done
-- Looking for memmove
-- Looking for memmove - not found
-- Looking for setmode
-- Looking for setmode - found
-- Looking for strcasecmp
-- Looking for strcasecmp - not found
-- Looking for strchr
-- Looking for strchr - found
-- Looking for strrchr
-- Looking for strrchr - found
-- Looking for strstr
-- Looking for strstr - found
-- Looking for strtol
-- Looking for strtol - found
-- Looking for strtol
-- Looking for strtol - found
-- Looking for strtoull
-- Looking for strtoull - found
-- Looking for lfind
-- Looking for lfind - found
-- Performing Test HAVE_SNPRINTF
-- Performing Test HAVE_SNPRINTF - Success
-- Performing Test HAVE_C_STD_C99
-- Performing Test HAVE_C_STD_C99 - Failed
-- Could NOT find OpenJPEG (minimal suitable version: 2.0, recommended version >= 2.3.1). OpenJPEG will be built from sources
-- OpenJPEG: VERSION = 2.4.0, BUILD = opencv-4.7.0-openjp2-2.4.0
-- Looking for stdlib.h
-- Looking for stdlib.h - found
-- Looking for stdio.h
-- Looking for stdio.h - found
-- Looking for math.h
-- Looking for math.h - found
-- Looking for float.h
-- Looking for float.h - found
-- Looking for time.h
-- Looking for time.h - found
-- Looking for stdarg.h
-- Looking for stdarg.h - found
-- Looking for ctype.h
-- Looking for ctype.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for strings.h
-- Looking for strings.h - not found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for unistd.h
-- Looking for unistd.h - not found
-- Looking for include file malloc.h
-- Looking for include file malloc.h - found
-- Looking for _aligned_malloc
-- Looking for _aligned_malloc - found
-- Looking for posix_memalign
-- Looking for posix_memalign - not found
-- Looking for memalign
-- Looking for memalign - not found
-- OpenJPEG libraries will be built from sources: libopenjp2 (version "2.4.0")
-- IPPICV: Downloading ippicv_2020_win_intel64_20191018_general.zip from https://raw.githubusercontent.com/opencv/opencv_3rdparty/a56b6ac6f030c312b2dce17430eef13aed9af274/ippicv/ippicv_2020_win_intel64_20191018_general.zip
-- found Intel IPP (ICV version): 2020.0.0 [2020.0.0 Gold]
-- at: D:/build/opencv/is/23280_3_2_6_vs_min/3rdparty/ippicv/ippicv_win/icv
-- found Intel IPP Integration Wrappers sources: 2020.0.0
-- at: D:/build/opencv/is/23280_3_2_6_vs_min/3rdparty/ippicv/ippicv_win/iw
-- Found CUDNN: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.0/lib/x64/cudnn.lib (found suitable version "8.7.0", minimum required is "7.5")
-- CUDA detected: 12.0
-- CUDA: Using CUDA_ARCH_BIN=8.6
-- CUDA NVCC target flags: -gencode;arch=compute_86,code=sm_86;-D_FORCE_INLINES
-- CUDA: MSVS generator is detected. Disabling CMake re-run checks (CMAKE_SUPPRESS_REGENERATION=ON). You need to run CMake manually if updates are required.
-- Could not find OpenBLAS include. Turning OpenBLAS_FOUND off
-- Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off
-- Looking for sgemm_
-- Looking for sgemm_ - not found
-- Found Threads: TRUE
-- Could NOT find BLAS (missing: BLAS_LIBRARIES)
-- Could NOT find LAPACK (missing: LAPACK_LIBRARIES)
    Reason given by package: LAPACK could not be found because dependency BLAS could not be found.

-- Could NOT find JNI (missing: JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 AWT JVM)
-- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
-- ADE: Downloading v0.1.2a.zip from https://github.com/opencv/ade/archive/v0.1.2a.zip
-- FFMPEG: Downloading opencv_videoio_ffmpeg.dll from https://raw.githubusercontent.com/opencv/opencv_3rdparty/7dd0d4f1d6fe75f05f3d3b5e38cbc96c1a2d2809/ffmpeg/opencv_videoio_ffmpeg.dll
-- FFMPEG: Downloading opencv_videoio_ffmpeg_64.dll from https://raw.githubusercontent.com/opencv/opencv_3rdparty/7dd0d4f1d6fe75f05f3d3b5e38cbc96c1a2d2809/ffmpeg/opencv_videoio_ffmpeg_64.dll
-- FFMPEG: Downloading ffmpeg_version.cmake from https://raw.githubusercontent.com/opencv/opencv_3rdparty/7dd0d4f1d6fe75f05f3d3b5e38cbc96c1a2d2809/ffmpeg/ffmpeg_version.cmake
-- Looking for mfapi.h
-- Looking for mfapi.h - found
-- Looking for vidcap.h
-- Looking for vidcap.h - found
-- Looking for d3d11_4.h
-- Looking for d3d11_4.h - found
-- Module opencv_alphamat disabled because the following dependencies are not found: Eigen
-- freetype2:   NO
-- harfbuzz:    NO
-- Julia not found. Not compiling Julia Bindings.
-- Module opencv_ovis disabled because OGRE3D was not found
-- No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available.
-- Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake.
-- Failed to find gflags - Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components.
-- Failed to find gflags - Could not find gflags include directory, set GFLAGS_INCLUDE_DIR to directory containing gflags/gflags.h
-- Failed to find glog - Could not find glog include directory, set GLOG_INCLUDE_DIR to directory containing glog/logging.h
-- Module opencv_sfm disabled because the following dependencies are not found: Eigen Glog/Gflags
-- Tesseract:   NO
CMake Warning at D:/repos/opencv/contrib/modules/cudev/test/CMakeLists.txt:20 (message):
  CUDA_NVCC_FLAGS=
  -gencode;arch=compute_86,code=sm_86;-D_FORCE_INLINES;-Xcompiler;-FS


-- Allocator metrics storage type: 'long long'
-- Excluding from source files list: modules/imgproc/src/imgwarp.lasx.cpp
-- Excluding from source files list: modules/imgproc/src/resize.lasx.cpp
-- Registering hook 'INIT_MODULE_SOURCES_opencv_dnn': D:/repos/opencv/opencv/modules/dnn/cmake/hooks/INIT_MODULE_SOURCES_opencv_dnn.cmake
-- Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.rvv.cpp
-- Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.lasx.cpp
-- Excluding from source files list: <BUILD>/modules/dnn/int8layers/layers_common.lasx.cpp
-- imgcodecs: OpenEXR codec is disabled in runtime. Details: https://github.com/opencv/opencv/issues/21326
-- highgui: using builtin backend: WIN32UI
-- rgbd: Eigen support is disabled. Eigen is Required for Posegraph optimization
-- wechat_qrcode: Downloading detect.caffemodel from https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/a8b69ccc738421293254aec5ddb38bd523503252/detect.caffemodel
-- wechat_qrcode: Downloading detect.prototxt from https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/a8b69ccc738421293254aec5ddb38bd523503252/detect.prototxt
-- wechat_qrcode: Downloading sr.caffemodel from https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/a8b69ccc738421293254aec5ddb38bd523503252/sr.caffemodel
-- wechat_qrcode: Downloading sr.prototxt from https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/a8b69ccc738421293254aec5ddb38bd523503252/sr.prototxt
-- xfeatures2d/boostdesc: Downloading boostdesc_bgm.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm.i
-- xfeatures2d/boostdesc: Downloading boostdesc_bgm_bi.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_bi.i
-- xfeatures2d/boostdesc: Downloading boostdesc_bgm_hd.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_hd.i
-- xfeatures2d/boostdesc: Downloading boostdesc_binboost_064.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_064.i
-- xfeatures2d/boostdesc: Downloading boostdesc_binboost_128.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_128.i
-- xfeatures2d/boostdesc: Downloading boostdesc_binboost_256.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_256.i
-- xfeatures2d/boostdesc: Downloading boostdesc_lbgm.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_lbgm.i
-- xfeatures2d/vgg: Downloading vgg_generated_48.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_48.i
-- xfeatures2d/vgg: Downloading vgg_generated_64.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_64.i
-- xfeatures2d/vgg: Downloading vgg_generated_80.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_80.i
-- xfeatures2d/vgg: Downloading vgg_generated_120.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_120.i
-- data: Downloading face_landmark_model.dat from https://raw.githubusercontent.com/opencv/opencv_3rdparty/8afa57abc8229d611c4937165d20e2a2d9fc5a12/face_landmark_model.dat
-- NVIDIA_OPTICAL_FLOW: Downloading edb50da3cf849840d680249aa6dbef248ebce2ca.zip from https://github.com/NVIDIA/NVIDIAOpticalFlowSDK/archive/edb50da3cf849840d680249aa6dbef248ebce2ca.zip
-- Building with NVIDIA Optical Flow API 2.0
-- Found 'misc' Python modules from D:/repos/opencv/opencv/modules/python/package/extra_modules
-- Found 'mat_wrapper;utils' Python modules from D:/repos/opencv/opencv/modules/core/misc/python/package
-- Found 'gapi' Python modules from D:/repos/opencv/opencv/modules/gapi/misc/python/package
--
-- General configuration for OpenCV 4.7.0 =====================================
--   Version control:               4.7.0-1-g56c51ab240
--
--   Extra modules:
--     Location (extra):            D:/repos/opencv/contrib/modules
--     Version control (extra):     4.7.0-1-gdb14e6c4-dirty
--
--   Platform:
--     Timestamp:                   2023-03-07T14:42:58Z
--     Host:                        Windows 10.0.22621 AMD64
--     CMake:                       3.26.0-rc5
--     CMake generator:             Visual Studio 17 2022
--     CMake build tool:            C:/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin/amd64/MSBuild.exe
--     MSVC:                        1934
--     Configuration:               Debug Release
--
--   CPU/HW features:
--     Baseline:                    SSE SSE2 SSE3
--       requested:                 SSE3
--     Dispatched code generation:  SSE4_1 SSE4_2 FP16 AVX AVX2 AVX512_SKX
--       requested:                 SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
--       SSE4_1 (18 files):         + SSSE3 SSE4_1
--       SSE4_2 (2 files):          + SSSE3 SSE4_1 POPCNT SSE4_2
--       FP16 (1 files):            + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
--       AVX (5 files):             + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
--       AVX2 (34 files):           + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
--       AVX512_SKX (8 files):      + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_COMMON AVX512_SKX
--
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++ standard:                11
--     C++ Compiler:                C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe  (ver 19.34.31937.0)
--     C++ flags (Release):         /DWIN32 /D_WINDOWS /W4 /GR  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise     /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819 /MP  /MD /O2 /Ob2 /DNDEBUG
--     C++ flags (Debug):           /DWIN32 /D_WINDOWS /W4 /GR  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise     /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819 /MP  /MDd /Zi /Ob0 /Od /RTC1
--     C Compiler:                  C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe
--     C flags (Release):           /DWIN32 /D_WINDOWS /W3  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise     /MP   /MD /O2 /Ob2 /DNDEBUG
--     C flags (Debug):             /DWIN32 /D_WINDOWS /W3  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise     /MP /MDd /Zi /Ob0 /Od /RTC1
--     Linker flags (Release):      /machine:x64  /INCREMENTAL:NO
--     Linker flags (Debug):        /machine:x64  /debug /INCREMENTAL
--     ccache:                      NO
--     Precompiled headers:         YES
--     Extra dependencies:          cudart_static.lib nppc.lib nppial.lib nppicc.lib nppidei.lib nppif.lib nppig.lib nppim.lib nppist.lib nppisu.lib nppitc.lib npps.lib cublas.lib cudnn.lib cufft.lib -LIBPATH:C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.0/lib/x64
--     3rdparty dependencies:
--
--   OpenCV modules:
--     To be built:                 aruco barcode bgsegm bioinspired calib3d ccalib core cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev datasets dnn dnn_objdetect dnn_superres dpm face features2d flann fuzzy gapi hfs highgui img_hash imgcodecs imgproc intensity_transform line_descriptor mcc ml objdetect optflow phase_unwrapping photo plot quality rapid reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab wechat_qrcode xfeatures2d ximgproc xobjdetect xphoto
--     Disabled:                    world
--     Disabled by dependency:      -
--     Unavailable:                 alphamat cvv freetype hdf java julia matlab ovis python2 python3 sfm viz
--     Applications:                tests perf_tests apps
--     Documentation:               NO
--     Non-free algorithms:         NO
--
--   Windows RT support:            NO
--
--   GUI:                           WIN32UI
--     Win32 UI:                    YES
--     VTK support:                 NO
--
--   Media I/O:
--     ZLib:                        build (ver 1.2.13)
--     JPEG:                        build-libjpeg-turbo (ver 2.1.3-62)
--       SIMD Support Request:      YES
--       SIMD Support:              NO
--     WEBP:                        build (ver encoder: 0x020f)
--     PNG:                         build (ver 1.6.37)
--     TIFF:                        build (ver 42 - 4.2.0)
--     JPEG 2000:                   build (ver 2.4.0)
--     OpenEXR:                     build (ver 2.3.0)
--     HDR:                         YES
--     SUNRASTER:                   YES
--     PXM:                         YES
--     PFM:                         YES
--
--   Video I/O:
--     DC1394:                      NO
--     FFMPEG:                      YES (prebuilt binaries)
--       avcodec:                   YES (58.134.100)
--       avformat:                  YES (58.76.100)
--       avutil:                    YES (56.70.100)
--       swscale:                   YES (5.9.100)
--       avresample:                YES (4.0.0)
--     GStreamer:                   NO
--     DirectShow:                  YES
--     Media Foundation:            YES
--       DXVA:                      YES
--
--   Parallel framework:            Concurrency
--
--   Trace:                         YES (with Intel ITT)
--
--   Other third-party libraries:
--     Intel IPP:                   2020.0.0 Gold [2020.0.0]
--            at:                   D:/build/opencv/is/23280_3_2_6_vs_min/3rdparty/ippicv/ippicv_win/icv
--     Intel IPP IW:                sources (2020.0.0)
--               at:                D:/build/opencv/is/23280_3_2_6_vs_min/3rdparty/ippicv/ippicv_win/iw
--     Lapack:                      NO
--     Eigen:                       NO
--     Custom HAL:                  NO
--     Protobuf:                    build (3.19.1)
--
--   NVIDIA CUDA:                   YES (ver 12.0, CUFFT CUBLAS NVCUVID NVCUVENC)
--     NVIDIA GPU arch:             86
--     NVIDIA PTX archs:
--
--   cuDNN:                         YES (ver 8.7.0)
--
--   OpenCL:                        YES (NVD3D11)
--     Include path:                D:/repos/opencv/opencv/3rdparty/include/opencl/1.2
--     Link libraries:              Dynamic load
--
--   Python (for build):            C:/Users/b/mambaforge/python.exe
--
--   Java:
--     ant:                         NO
--     JNI:                         NO
--     Java wrappers:               NO
--     Java tests:                  NO
--
--   Install to:                    D:/build/opencv/is/23280_3_2_6_vs_min/install
-- -----------------------------------------------------------------
--
-- Configuring done (53.5s)
-- Generating done (2.6s)
-- Build files have been written to: D:/build/opencv/is/23280_3_2_6_vs_min
"D:\bin\cmake\cmake-3.26.0-rc5-windows-x86_64\bin\cmake.exe" --build %openCvBuild% --target install

If this works for you let me know and I’ll submit a PR.

I would guess this has something to do with the use of the depreciated `FindCUDA.cmake’ and therefore may not be fixed/changed in CMake.

We have to wait but it is solved

1 Like

solved with CMake version 3.26.0-rc6