Skip to content

Commit 000ee28

Browse files
committed
Don't add C++ standard flag to Windows for CUDA versions less than 11.0 when using the depreciated FindCUDA module.
1 parent ad5a0ad commit 000ee28

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

modules/cudev/test/CMakeLists.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ if(OCV_DEPENDENCIES_FOUND)
2020
ocv_check_windows_crt_linkage()
2121
set(target_libs ${target_libs} ${CUDA_LIBRARIES})
2222
if(CUDA_VERSION VERSION_LESS "11.0")
23-
ocv_update(OPENCV_CUDA_OPTIONS_opencv_test_cudev "-std=c++11")
23+
# Windows version does not support --std option
24+
if(UNIX OR APPLE)
25+
ocv_update(OPENCV_CUDA_OPTIONS_opencv_test_cudev "-std=c++11")
26+
endif()
2427
else()
2528
if(CUDA_VERSION VERSION_LESS "12.8")
2629
ocv_update(OPENCV_CUDA_OPTIONS_opencv_test_cudev "-std=c++14")

0 commit comments

Comments
 (0)