penguinV icon indicating copy to clipboard operation
penguinV copied to clipboard

Include CUDA examples into CMake compilation

Open ihhub opened this issue 6 years ago • 2 comments

Recently we added CUDA compilation support into CMake. We have few Cuda examples: examples/cuda/image_function/ and examples/cuda/pinned_memory/ which we would like to add as a part of CMake.

ihhub avatar Mar 12 '19 02:03 ihhub

Hi @yannlabou is it hard to do?

ihhub avatar May 27 '19 08:05 ihhub

It shouldn't be harder than

if (CUDA_FOUND)
   add_subdirectory(examples/cuda/image_function)
   add_subdirectory(examples/cuda/pinned_memory)
endif(CUDA_FOUND)

In the named subdirs, create CMakelists.txt files with roughly something like

cuda_add_executable(image_function example_image_function.cpp)

Given the limited amount of time I actually have, I think it's good to let newcomers take care of it.

yannlabou avatar May 30 '19 09:05 yannlabou