File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -19,20 +19,24 @@ if(OCV_DEPENDENCIES_FOUND)
1919 if (NOT ENABLE_CUDA_FIRST_CLASS_LANGUAGE)
2020 ocv_check_windows_crt_linkage()
2121 set (target_libs ${target_libs} ${CUDA_LIBRARIES} )
22+ set (test_cudev_cuda_options "" )
2223 if (CUDA_VERSION VERSION_LESS "11.0" )
2324 # Windows version does not support --std option
2425 if (UNIX OR APPLE )
25- ocv_update(OPENCV_CUDA_OPTIONS_opencv_test_cudev "-std=c++11" )
26+ list ( APPEND test_cudev_cuda_options "-std=c++11" )
2627 endif ()
2728 else ()
2829 if (CUDA_VERSION VERSION_LESS "12.8" )
29- ocv_update(OPENCV_CUDA_OPTIONS_opencv_test_cudev "-std=c++14" )
30+ list ( APPEND test_cudev_cuda_options "-std=c++14" )
3031 else ()
31- ocv_update(OPENCV_CUDA_OPTIONS_opencv_test_cudev "-std=c++17" )
32+ list (APPEND test_cudev_cuda_options "-std=c++17" )
33+ if (WIN32 )
34+ list (APPEND test_cudev_cuda_options "-Xcompiler=/Zc:preprocessor" )
35+ endif ()
3236 endif ()
3337 ocv_warnings_disable(CMAKE_CXX_FLAGS -Wdeprecated-declarations)
3438 endif ()
35- CUDA_ADD_EXECUTABLE(${the_target} ${OPENCV_TEST_${the_module} _SOURCES} OPTIONS ${OPENCV_CUDA_OPTIONS_opencv_test_cudev } )
39+ CUDA_ADD_EXECUTABLE(${the_target} ${OPENCV_TEST_${the_module} _SOURCES} OPTIONS ${test_cudev_cuda_options } )
3640 else ()
3741 ocv_add_executable(${the_target} ${OPENCV_TEST_${the_module} _SOURCES})
3842 endif ()
You can’t perform that action at this time.
0 commit comments