Browse Source

Force C++17 Standard for CUDA targets when toolkit >=12.8 as required by the latest versions of Thrust.

pull/3908/head
cudawarped 4 months ago
parent
commit
c5c66f87d2
  1. 6
      modules/cudev/test/CMakeLists.txt

6
modules/cudev/test/CMakeLists.txt

@ -22,7 +22,11 @@ if(OCV_DEPENDENCIES_FOUND) @@ -22,7 +22,11 @@ if(OCV_DEPENDENCIES_FOUND)
if(CUDA_VERSION VERSION_LESS "11.0")
ocv_update(OPENCV_CUDA_OPTIONS_opencv_test_cudev "-std=c++11")
else()
ocv_update(OPENCV_CUDA_OPTIONS_opencv_test_cudev "-std=c++14")
if(CUDA_VERSION VERSION_LESS "12.8")
ocv_update(OPENCV_CUDA_OPTIONS_opencv_test_cudev "-std=c++14")
else()
ocv_update(OPENCV_CUDA_OPTIONS_opencv_test_cudev "-std=c++17")
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})

Loading…
Cancel
Save