mirror of
https://github.com/zebrajr/opencv.git
synced 2025-12-06 12:19:50 +01:00
Merge pull request #27858 from dkurt:check_test_target
Check CMake target before use
This commit is contained in:
commit
317ba5f176
|
|
@ -210,8 +210,10 @@ endif()
|
|||
ocv_add_accuracy_tests()
|
||||
ocv_add_perf_tests()
|
||||
|
||||
if (HAVE_CUDA)
|
||||
if (TARGET opencv_test_core AND HAVE_CUDA)
|
||||
ocv_target_compile_definitions(opencv_test_core PRIVATE "HAVE_CUDA=1")
|
||||
endif()
|
||||
if (TARGET opencv_perf_core AND HAVE_CUDA)
|
||||
ocv_target_compile_definitions(opencv_perf_core PRIVATE "HAVE_CUDA=1")
|
||||
endif()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user