[Insight-developers] nvcc compilation of ITK

Richard Beare richard.beare at gmail.com
Tue Feb 8 23:22:48 EST 2011


Hi,
I'm testing a project done by some students last year and discussed on
this list. I'm hoping to produce a more ITK-like compilation process.
The best way to do this appears to be to use nvcc as the main compiler
for ITK (which should end up compiling most of the conventional c++
code with gcc) so that any cuda enabled filters can be compiled
transparently. There are appear to be some old discussions on this
topic that show up. I was wondering whether there have been any recent
tests, and whether the version of FindCUDA included with the recent
versions of CMake is appropriate for the job. Are modifications to the
main ITK CMake file available anywhere. The quick test I did seemed to
result in c++ parameters being passed direct to nvcc, resulting in
failures to configure:

e.g.


Run Build Command:/opt/local/bin/gmake "cmTryCompileExec/fast"
/opt/local/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make
CMakeFiles/cmTryCompileExec.dir/build
gmake[1]: Entering directory `/Users/richardb/Build/BI_nvcc/CMakeFiles/CMakeTmp'
"/Applications/CMake 2.8-1.app/Contents/bin/cmake" -E
cmake_progress_report
/Users/richardb/Build/BI_nvcc/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o
/usr/local/cuda/bin/nvcc    -o
CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o   -c
/Users/richardb/Build/BI_nvcc/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTryCompileExec
"/Applications/CMake 2.8-1.app/Contents/bin/cmake" -E
cmake_link_script CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1
/usr/local/cuda/bin/nvcc      -Wl,-search_paths_first
-headerpad_max_install_names
CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o  -o cmTryCompileExec
nvcc fatal   : Unknown option 'Wl,-search_paths_first'
gmake[1]: *** [cmTryCompileExec] Error 255


Thanks


More information about the Insight-developers mailing list