Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions modules/cudev/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,24 @@ if(OCV_DEPENDENCIES_FOUND)
if(NOT ENABLE_CUDA_FIRST_CLASS_LANGUAGE)
ocv_check_windows_crt_linkage()
set(target_libs ${target_libs} ${CUDA_LIBRARIES})
set(test_cudev_cuda_options "")
if(CUDA_VERSION VERSION_LESS "11.0")
# Windows version does not support --std option
if(UNIX OR APPLE)
ocv_update(OPENCV_CUDA_OPTIONS_opencv_test_cudev "-std=c++11")
list(APPEND test_cudev_cuda_options "-std=c++11")
endif()
else()
if(CUDA_VERSION VERSION_LESS "12.8")
ocv_update(OPENCV_CUDA_OPTIONS_opencv_test_cudev "-std=c++14")
list(APPEND test_cudev_cuda_options "-std=c++14")
else()
ocv_update(OPENCV_CUDA_OPTIONS_opencv_test_cudev "-std=c++17")
list(APPEND test_cudev_cuda_options "-std=c++17")
if(WIN32)
list(APPEND test_cudev_cuda_options "-Xcompiler=/Zc:preprocessor")
endif()
endif()
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wdeprecated-declarations)
endif()
CUDA_ADD_EXECUTABLE(${the_target} ${OPENCV_TEST_${the_module}_SOURCES} OPTIONS ${OPENCV_CUDA_OPTIONS_opencv_test_cudev})
CUDA_ADD_EXECUTABLE(${the_target} ${OPENCV_TEST_${the_module}_SOURCES} OPTIONS ${test_cudev_cuda_options})
else()
ocv_add_executable(${the_target} ${OPENCV_TEST_${the_module}_SOURCES})
endif()
Expand Down
Loading