lundi 2 mars 2015

Linking c++ excutable program to CUDA excutable program in the same project


In accounting directory in my project I generate an executable object , count_part , for accounting.cpp . Also , I generate an executable object , finan_part , for financial.cu in another directory in the same project . Question : How can I link this count_part object file to the finan_part using Cmake , I tried this CmakeList.txt for the directory where financial.cu is placed :



find_package(CUDA)
link_libraries(${CUDA} -lpthread)
cuda_add_executable( finan_part financial.cu )
target_link_libraries( finan_part count_part)


I appreciate any help . Thank you




Aucun commentaire:

Enregistrer un commentaire