1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-19 02:16:34 +08:00

Don't add C++ standard flag to Windows for CUDA versions less than 11.0 when using the depreciated FindCUDA module.

This commit is contained in:
cudawarped
2025-03-27 16:18:30 +02:00
parent ad5a0ad69b
commit 000ee28094

View File

@@ -20,7 +20,10 @@ if(OCV_DEPENDENCIES_FOUND)
ocv_check_windows_crt_linkage()
set(target_libs ${target_libs} ${CUDA_LIBRARIES})
if(CUDA_VERSION VERSION_LESS "11.0")
ocv_update(OPENCV_CUDA_OPTIONS_opencv_test_cudev "-std=c++11")
# Windows version does not support --std option
if(UNIX OR APPLE)
ocv_update(OPENCV_CUDA_OPTIONS_opencv_test_cudev "-std=c++11")
endif()
else()
if(CUDA_VERSION VERSION_LESS "12.8")
ocv_update(OPENCV_CUDA_OPTIONS_opencv_test_cudev "-std=c++14")