diff --git a/modules/cudev/test/CMakeLists.txt b/modules/cudev/test/CMakeLists.txt index ff936cad5..2ff4ebc1d 100644 --- a/modules/cudev/test/CMakeLists.txt +++ b/modules/cudev/test/CMakeLists.txt @@ -22,7 +22,11 @@ if(OCV_DEPENDENCIES_FOUND) if(CUDA_VERSION VERSION_LESS "11.0") ocv_update(OPENCV_CUDA_OPTIONS_opencv_test_cudev "-std=c++11") else() - ocv_update(OPENCV_CUDA_OPTIONS_opencv_test_cudev "-std=c++14") + if(CUDA_VERSION VERSION_LESS "12.8") + ocv_update(OPENCV_CUDA_OPTIONS_opencv_test_cudev "-std=c++14") + else() + ocv_update(OPENCV_CUDA_OPTIONS_opencv_test_cudev "-std=c++17") + endif() ocv_warnings_disable(CMAKE_CXX_FLAGS -Wdeprecated-declarations) endif() CUDA_ADD_EXECUTABLE(${the_target} ${OPENCV_TEST_${the_module}_SOURCES} OPTIONS ${OPENCV_CUDA_OPTIONS_opencv_test_cudev})