mirror of
https://github.com/opencv/opencv.git
synced 2025-07-24 14:06:27 +08:00
Merge pull request #27142 from asmorkalov:as/cuda_standard_all
Set C++ standard for all CUDA configurations
This commit is contained in:
commit
8e2826ddd6
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user