No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=armv7, VA 解决方法

No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=armv7, VA

运行报错

出现的原因:armv7s是应用在iPhone 5 A6 的架构上的
解决的方式:
1,在Project target里“Architectures”设置为“Standard (armv7,armv7s)”
2,修改在Project target里“Build Settings”的“Valid Architectures”添加“i386”和“armv7”(Xcode4.6 以上版本不再支持armv6,请去掉)
3,设置”Build Active Architecture Only”为“NO”。这样你build你的项目的时候就能在iphoe5和iphoe4s里执行。

armv6, armv7, armv7s的区别


解释:if(CUDA_FOUND) message(STATUS "Found CUDA Toolkit v${CUDA_VERSION_STRING}") enable_language(CUDA) set(HAVE_CUDA TRUE) if (CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA") if(${CUDA_VERSION_STRING} VERSION_GREATER_EQUAL "11.1") execute_process(COMMAND ${CMAKE_CUDA_COMPILER} --list-gpu-code RESULT_VARIABLE EXIT_CODE OUTPUT_VARIABLE OUTPUT_VAL) if(EXIT_CODE EQUAL 0) #Remove sm_ string(REPLACE "sm_" "" OUTPUT_VAL ${OUTPUT_VAL}) #Convert to list string(REPLACE "\n" ";" __CUDA_ARCH_BIN ${OUTPUT_VAL}) #Remove last empty entry list(REMOVE_AT __CUDA_ARCH_BIN -1) else() message(FATAL_ERROR "Failed to run NVCC to get list of GPU codes: ${EXIT_CODE}") endif() elseif(${CUDA_VERSION_STRING} VERSION_GREATER_EQUAL "11.0") set(__CUDA_ARCH_BIN "35;37;50;52;53;60;61;62;70;72;75;80") elseif(${CUDA_VERSION_STRING} VERSION_GREATER_EQUAL "10.0") set(__CUDA_ARCH_BIN "30;32;35;37;50;52;53;60;61;62;70;72;75") elseif(${CUDA_VERSION_STRING} VERSION_GREATER_EQUAL "9.1") set(__CUDA_ARCH_BIN "30;32;35;37;50;52;53;60;61;62;70;72") else() set(__CUDA_ARCH_BIN "30;32;35;37;50;52;53;60;61;62;70") endif() else() message(FATAL_ERROR "Unsupported CUDA compiler ${CMAKE_CUDA_COMPILER_ID}.") endif() set(CUDA_ARCH_BIN ${__CUDA_ARCH_BIN} CACHE STRING "Specify 'real' GPU architectures to build binaries for") if(POLICY CMP0104) cmake_policy(SET CMP0104 NEW) set(CMAKE_CUDA_ARCHITECTURES ${CUDA_ARCH_BIN}) message(STATUS "CMAKE_CUDA_ARCHITECTURES: ${CMAKE_CUDA_ARCHITECTURES}") #Add empty project as its not required with newer CMake add_library(pcl_cuda INTERFACE) else() # Generate SASS set(CMAKE_CUDA_ARCHITECTURES ${CUDA_ARCH_BIN}) # Generate PTX for last architecture list(GET CUDA_ARCH_BIN -1 ver) set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -gencode arch=compute_${ver},code=compute_${ver}") message(STATUS "CMAKE_CUDA_FLAGS: ${CMAKE_CUDA_FLAGS}") add_library(pcl_cuda INTERFACE) target_include_directories(pcl_cuda INTERFACE ${CUDA_TOOLKIT_INCLUDE}) endif () endif()
最新发布
05-30
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值