[ITK Community] Another CUDA + ITK question

Chuck Hatt hatt at wisc.edu
Tue Jan 28 19:11:12 EST 2014


Hi Brian,

It is CMake 2.8.12.2.

I'd also like to mention that I have other ITK+CMake projects that do NOT
use CUDA, (just .cxx files) and they compile into a working executable on
my system.

-Chuck


On Tue, Jan 28, 2014 at 5:30 PM, Brian Helba <brian.helba at kitware.com>wrote:

> Hi Chuck,
>
> Can you be more specific* about what version of CMake you're using (what
> is x in 2.8.x).
>
> This may help others in diagnosing your issue.
>
> Thanks,
> Brian
>
> * For idiosyncratic backwards-compatibility reasons, the 3rd number group
> ("patch" version) indicates the actual feature release version of CMake.
> On Jan 28, 2014 5:49 PM, "Chuck Hatt" <hatt at wisc.edu> wrote:
>
>> I'm trying to get CUDA working with ITK.  I have cuda code that works
>> already, but I need to incorporate my CUDA functions into an optimization
>> framework and I want to use ITK's functions.
>>
>> Normally when I want to write an application using a programming library,
>> I just build up from a simple example.  However, merging ITK and CUDA
>> simple examples has been tricky.
>>
>> I am using VS2010 (I have no choice about this).  I am using Cmake 2.8,
>> ITK 4.5, CUDA 5.5
>>
>> Here is my CMakeLists.txt file.
>>
>> # This is the root ITK CMakeLists file.
>> CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
>> IF(COMMAND CMAKE_POLICY)
>>   CMAKE_POLICY(SET CMP0003 NEW)
>> ENDIF(COMMAND CMAKE_POLICY)
>>
>>
>> # This project is designed to be built outside the Insight source tree.
>> PROJECT(myproject)
>>
>> FIND_PACKAGE(CUDA)
>>
>> # Find ITK.
>> FIND_PACKAGE(ITK REQUIRED)
>> INCLUDE(${ITK_USE_FILE})
>>
>> #Add cuda executables
>> CUDA_ADD_EXECUTABLE(myproject main.cu )
>> TARGET_LINK_LIBRARIES(myproject ${ITK_LIBRARIES})
>>
>> This generates a working executable when main.cu only contains my
>> previously working CUDA code.  However, when I add the line
>>
>>
>> #include "itkPowellOptimizer.h" to the top of main.cu file
>>
>> I get a bunch of errors related to what look to be windows files and ITK
>> files.  For example:
>>
>> Error 30 error : expected a "," or ">"
>> c:\src\itk\insighttoolkit-4.5.0\modules\thirdparty\vnl\src\vxl\core\vnl\vnl_matrix_fixed.h
>> 900
>>
>> Error 26 error : expected a ")"
>> c:\src\itk\insighttoolkit-4.5.0\modules\core\common\include\itkPoint.hxx
>> 228
>>
>> Error 7 error : expected a ")" C:\Program Files (x86)\Microsoft
>> SDKs\Windows\v7.0A\include\basetsd.h 376
>>
>>
>> I really have no idea how to go about fixing this.  Any help would be
>> appreciated.
>>
>> _______________________________________________
>> Community mailing list
>> Community at itk.org
>> http://public.kitware.com/cgi-bin/mailman/listinfo/community
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140128/ce2d0e46/attachment-0002.html>


More information about the Community mailing list