From 1cba763189a365a6bfd3f613c506797e4e199c21 Mon Sep 17 00:00:00 2001 From: Tomoaki Teshima Date: Wed, 17 Jun 2020 22:02:51 +0900 Subject: [PATCH] fix build error of automatic CC detection --- cmake/OpenCVDetectCUDA.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/OpenCVDetectCUDA.cmake b/cmake/OpenCVDetectCUDA.cmake index 37a77cd..ecaec3f 100644 --- a/cmake/OpenCVDetectCUDA.cmake +++ b/cmake/OpenCVDetectCUDA.cmake @@ -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 "") -- 2.7.4