mirror of
https://github.com/opencv/opencv.git
synced 2026-07-21 19:33:03 +04:00
Set C++ standard for all CUDA configurations.
This commit is contained in:
@@ -152,14 +152,15 @@ macro(ocv_cuda_compile VAR)
|
||||
ocv_nvcc_flags()
|
||||
|
||||
if(NOT " ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_DEBUG} ${CUDA_NVCC_FLAGS}" MATCHES "-std=")
|
||||
if(UNIX OR APPLE)
|
||||
if(CUDA_VERSION VERSION_LESS "11.0")
|
||||
if(CUDA_VERSION VERSION_LESS "11.0")
|
||||
# Windows version does not support --std option
|
||||
if(UNIX OR APPLE)
|
||||
list(APPEND CUDA_NVCC_FLAGS "--std=c++11")
|
||||
elseif(CUDA_VERSION VERSION_LESS "12.8")
|
||||
list(APPEND CUDA_NVCC_FLAGS "--std=c++14")
|
||||
elseif(CUDA_VERSION VERSION_GREATER_EQUAL "12.8")
|
||||
list(APPEND CUDA_NVCC_FLAGS "--std=c++17")
|
||||
endif()
|
||||
elseif(CUDA_VERSION VERSION_LESS "12.8")
|
||||
list(APPEND CUDA_NVCC_FLAGS "--std=c++14")
|
||||
elseif(CUDA_VERSION VERSION_GREATER_EQUAL "12.8")
|
||||
list(APPEND CUDA_NVCC_FLAGS "--std=c++17")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user