mirror of
https://github.com/zebrajr/opencv.git
synced 2025-12-06 12:19:50 +01:00
Set C++ standard for all CUDA configurations.
This commit is contained in:
parent
7d87f3cda6
commit
68a595d88b
|
|
@ -152,16 +152,17 @@ 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")
|
||||
# Windows version does not support --std option
|
||||
if(UNIX OR APPLE)
|
||||
list(APPEND CUDA_NVCC_FLAGS "--std=c++11")
|
||||
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()
|
||||
endif()
|
||||
|
||||
CUDA_COMPILE(${VAR} ${ARGN})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user