当在cmakelist中同时含有PCL、CUDA 可能出现一下错误
问题:nvcc fatal : A single input file is required for a non-link phase when an outputfile is specified
在pcl 下放加入:
get_directory_property(dir_defs DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS)
set(vtk_flags)
foreach(it ${dir_defs})
if(it MATCHES "vtk*")
list(APPEND vtk_flags ${it})
endif()
endforeach()
foreach(d ${vtk_flags})
remove_definitions(-D${d})
endforeach()
问题:消除报警nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated,
使用cmake-gui 设置CUDA_NVCC_FLAGS 为--Wno-deprecated-gpu-targets
cmake -DBLAS=Open -DCUDA_NVCC_FLAGS=--Wno-deprecated-gpu-targets ..