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)
19
19
if (NOT ENABLE_CUDA_FIRST_CLASS_LANGUAGE )
20
20
ocv_check_windows_crt_linkage ()
21
21
set (target_libs ${target_libs} ${CUDA_LIBRARIES} )
22
+ set (test_cudev_cuda_options "" )
22
23
if (CUDA_VERSION VERSION_LESS "11.0" )
23
24
# Windows version does not support --std option
24
25
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" )
26
27
endif ()
27
28
else ()
28
29
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" )
30
31
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 ()
32
36
endif ()
33
37
ocv_warnings_disable (CMAKE_CXX_FLAGS -Wdeprecated-declarations )
34
38
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 } )
36
40
else ()
37
41
ocv_add_executable (${the_target} ${OPENCV_TEST_${the_module}_SOURCES} )
38
42
endif ()
You can’t perform that action at this time.
0 commit comments