1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

[cuda] Add cudart to all modules which use it

This commit is contained in:
cudawarped
2025-10-28 14:05:18 +02:00
parent d7f6201219
commit 6adb985679
4 changed files with 15 additions and 8 deletions
+6 -2
View File
@@ -165,7 +165,7 @@ if(HAVE_CUDA)
message(FATAL_ERROR "CUDA: OpenCV requires enabled 'cudev' module from 'opencv_contrib' repository: https://github.com/opencv/opencv_contrib")
endif()
if(ENABLE_CUDA_FIRST_CLASS_LANGUAGE)
ocv_module_include_directories(${CUDAToolkit_INCLUDE_DIRS})
list(APPEND extra_libs CUDA::cudart${CUDA_LIB_EXT})
endif()
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef -Wenum-compare -Wunused-function -Wshadow)
endif()
@@ -209,7 +209,11 @@ if(HAVE_OPENMP AND DEFINED OpenMP_CXX_LIBRARIES AND OpenMP_CXX_LIBRARIES)
ocv_target_link_libraries(${the_module} LINK_PRIVATE "${OpenMP_CXX_LIBRARIES}")
endif()
ocv_add_accuracy_tests()
set(test_libs "")
if(HAVE_CUDA AND ENABLE_CUDA_FIRST_CLASS_LANGUAGE)
list(APPEND test_libs CUDA::cudart${CUDA_LIB_EXT})
endif()
ocv_add_accuracy_tests(${test_libs})
ocv_add_perf_tests()
ocv_install_3rdparty_licenses(SoftFloat "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/SoftFloat/COPYING.txt")