[ITK-users] Create ITK Project with CUDA from CMake
D'Isidoro Fabio
fisidoro at ethz.ch
Tue Mar 21 13:49:23 EDT 2017
Hallo,
I have a .cu CUDA main code which makes use of itk to read and write images.
How can I create a new ITK project with Cmake that include CUDA? I could not find any tutorial/description on it. Since I am not familiar with Cmake, I would need an understandable and detailed description.
The most basic CmakeLists.txt I could find does not work:
------------------------------
project(CUDAitk)
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})
find_package(CUDA REQUIRED)
CUDA_INCLUDE_DIRECTORIES(${ITK_INCLUDE_DIRS})
cuda_add_executable(CUDAitk CUDAitk.cu)
target_link_libraries(CUDAitk ${ITK_LIBRARIES})
------------------------------
The compling errors I get are like:
error C2244: 'itk::FixedArray<TValue,VLength>::FixedArray': unable to match function definition to an existing declaration
CMake Error at CUDAitk_generated_CUDAitk.cu.obj.Debug.cmake:267 (message):
Error generating file
C:/Users/Fabio/Documents/CUDAitk_cpp2/bin/CMakeFiles/CUDAitk.dir//Debug/CUDAitk_generated_CUDAitk.cu.obj
Any help is highly appreciated.
Thank you!
Fabio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20170321/6b0a3be3/attachment.html>
More information about the Insight-users
mailing list