fix build error of automatic CC detection
This commit is contained in:
parent
d321a34f7c
commit
1cba763189
@ -101,7 +101,7 @@ if(CUDA_FOUND)
|
||||
else()
|
||||
set(CC_LIST ${ARGN})
|
||||
foreach(target_arch ${CC_LIST})
|
||||
string(REPLACE "." "" target_arch_short ${target_arch})
|
||||
string(REPLACE "." "" target_arch_short "${target_arch}")
|
||||
set(NVCC_OPTION "-gencode;arch=compute_${target_arch_short},code=sm_${target_arch_short}")
|
||||
execute_process( COMMAND "${CUDA_NVCC_EXECUTABLE}" ${NVCC_OPTION} "${OpenCV_SOURCE_DIR}/cmake/checks/OpenCVDetectCudaArch.cu"
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
|
||||
@ -111,7 +111,7 @@ if(CUDA_FOUND)
|
||||
set(${result_list} "${${result_list}} ${target_arch}")
|
||||
endif()
|
||||
endforeach()
|
||||
string(STRIP ${${result_list}} ${result_list})
|
||||
string(STRIP "${${result_list}}" ${result_list})
|
||||
set(CUDA_SUPPORTED_CC ${${result_list}} CACHE INTERNAL "List of supported compute capability")
|
||||
endif()
|
||||
endmacro()
|
||||
@ -124,7 +124,7 @@ if(CUDA_FOUND)
|
||||
endmacro()
|
||||
|
||||
macro(ocv_wipeout_deprecated _arch_bin_list)
|
||||
string(REPLACE "2.1" "2.1(2.0)" ${_arch_bin_list} ${${_arch_bin_list}})
|
||||
string(REPLACE "2.1" "2.1(2.0)" ${_arch_bin_list} "${${_arch_bin_list}}")
|
||||
endmacro()
|
||||
|
||||
set(__cuda_arch_ptx "")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user