[Insight-developers] How to generate complex dependencies (CMake)

Luis Ibanez luis.ibanez at kitware.com
Mon Jan 10 08:47:21 EST 2011


Hi Richard,

I'm wondering if you have taken a look at
http://svn.na-mic.org/NAMICSandBox/trunk/CUDA-ITK/Source/

particularly to:
http://svn.na-mic.org/NAMICSandBox/trunk/CUDA-ITK/Source/CMakeLists.txt

INCLUDE_DIRECTORIES(
  ${CUDA_TOOLKIT_INCLUDE}
  ${CUDA_CUT_INCLUDE_DIR}
  )

CUDA_ADD_EXECUTABLE(Example1 Example1.cu)

CUDA_ADD_EXECUTABLE(Example2
  Example2.cu
  Example2.cxx
  )

TARGET_LINK_LIBRARIES(Example2
  ITKIO
  )


Is that similar to what you are doing now ?


    Luis

--------------------------------------------------------------------------
On Sun, Jan 9, 2011 at 11:36 PM, Richard Beare <richard.beare at gmail.com> wrote:
> Hi,
>
> I'm trying to develop a method for nicely integrating the compilation
> process some prototype cuda code. We are already using FindCUDA.cmake
> developed by James Bigler. The issue I'm trying to solve is how to
> derive the correct .cu file from the source c++. At present it is
> necessary to know which cuda enabled classes are being used and
> explicitly include them as dependencies in the ADD_EXECUTABLE line,
> which doesn't fit with the normal ITK way of doing things. Ideally I'd
> like to be able to generate these dependencies automatically, possibly
> based on a naming convention or some other information that would be
> included in the c++ file that references the cuda kernel functions.
>
> Any thoughts?
>
> Thanks
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers
>


More information about the Insight-developers mailing list