Hi all,

I was trying to use CUDA_COMPILE_PTX to make nvcc compile *.cu files
to .ptx files but with no success.
Running make just compile my regular .cpp files and does nothing to .cu
files. I want the ptx files to use them with CUDA driver API.
I checked in the trunk SVN repository of FindCUDA but the line for
CUDA_COMPILE_PTX was commented out in the example.
Regards,

Denis

#####################################################################

# habilitar o módulo FindBoost
find_package (Boost 1.42.0 COMPONENTS thread)
# habilitar o módulo FindCUDA
find_package (CUDA)

file (GLOB_RECURSE sources *.cpp)
file (GLOB_RECURSE cufiles *.cu)
cuda_compile_ptx (ptxfiles cufiles)
add_executable (cuda_core_test ${sources})

# para poder usar variadic template parameters
set_target_properties (cuda_core_test PROPERTIES COMPILE_FLAGS -std=c
++0x)
# gcc version < 4.4 não possuem o header initilizer_list
add_definitions (-DBOOST_NO_0X_HDR_INITIALIZER_LIST)

include_directories (${CUDA_TOOLKIT_INCLUDE})
target_link_libraries (cuda_core_test ${CUDA_CUDA_LIBRARY}
${Boost_LIBRARIES})

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to