<font size="2"><font face="verdana,sans-serif">Hi all,</font></font><div><font size="2"><font face="verdana,sans-serif"><br></font></font></div><div><font size="2"><font face="verdana,sans-serif">I wanted to try ITK4 from git, among other things because it already includes <a href="http://www.insight-journal.org/browse/publication/176">IJ contribution 176</a>. It configures and builds without problems.</font></font></div>

<div><font size="2"><font face="verdana,sans-serif"><br></font></font></div><div><font size="2"><font face="verdana,sans-serif">However when I switch from ITK 3.20 to it in my project (called &quot;Spine&quot;), I start getting a new mysterious error:</font></font></div>

<div><font size="2"><div style="font-family: verdana, sans-serif; "><br></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">1&gt;------ Build started: Project: ZERO_CHECK, Configuration: Debug x64 ------</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">2&gt;------ Build started: Project: Spine, Configuration: Debug x64 ------</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">2&gt;  Building NVCC (Device) object Debug/Spine_generated_LHstuff.cu.obj</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">2&gt;  The command line is too long.</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">2&gt;  CMake Error at CMakeFiles/Spine_generated_LHstuff.cu.obj.cmake:198 (message):</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">2&gt;    Error generating D:/Repo/Spine/Debug/Spine_generated_LHstuff.cu.obj</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">2&gt;  </font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">2&gt;  </font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">2&gt;C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB6006: &quot;cmd.exe&quot; exited with code 1.</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">3&gt;------ Skipped Build: Project: ALL_BUILD, Configuration: Debug x64 ------</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">3&gt;Project not selected to build for this solution configuration </font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">========== Build: 1 succeeded, 1 failed, 1 up-to-date, 1 skipped ==========</font></div><div style="font-family: verdana, sans-serif; "><br></div>

<div style="font-family: verdana, sans-serif; ">LHstuff.cu compiles normally, both with CUDA toolkit 3.2 and the recently installed 4.0. I switched to VS2010 since I installed CUDA 4.0 a few days ago (when it was released). This is the only CUDA file in my project.</div>

<div style="font-family: verdana, sans-serif; "><br></div><div style="font-family: verdana, sans-serif; ">LHstuff.cu has the following custom build command (part of the CMake-generated .vcxproj):</div><div><div style="font-family: verdana, sans-serif; ">

<br></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">&quot;C:\Program Files (x86)\CMake 2.8\bin\cmake.exe&quot; -E make_directory D:/Repo/Spine/$(Configuration)</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">if errorlevel 1 goto :VCEnd</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">&quot;C:\Program Files (x86)\CMake 2.8\bin\cmake.exe&quot; -D verbose:BOOL=OFF -D &quot;CCBIN:PATH=$(VCInstallDir)bin&quot; -D build_configuration:STRING=$(ConfigurationName) -D generated_file:STRING=D:/Repo/Spine/$(Configuration)/Spine_generated_LHstuff.cu.obj -D generated_cubin_file:STRING=D:/Repo/Spine/$(Configuration)/Spine_generated_LHstuff.cu.obj.cubin.txt -P D:/Repo/Spine/CMakeFiles/Spine_generated_LHstuff.cu.obj.cmake</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">if errorlevel 1 goto :VCEnd</font></div></div><div style="font-family: verdana, sans-serif; "><br></div><div><font class="Apple-style-span" face="verdana, sans-serif">and the relevant part of &quot;</font><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">Spine_generated_LHstuff.cu.obj.cmake</font><span class="Apple-style-span" style="font-family: verdana, sans-serif; ">&quot; (around line 198):</span></div>

<div style="font-family: verdana, sans-serif; "><br></div><div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"># Generate the dependency file</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">cuda_execute_process(</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  &quot;Generating dependency file: ${NVCC_generated_dependency_file}&quot;</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  COMMAND &quot;${CUDA_NVCC_EXECUTABLE}&quot;</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  -M</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  ${CUDACC_DEFINE}</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  &quot;${source_file}&quot;</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  -o &quot;${NVCC_generated_dependency_file}&quot;</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  ${CCBIN}</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  ${nvcc_flags}</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  ${nvcc_host_compiler_flags}</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  ${depends_CUDA_NVCC_FLAGS}</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  -DNVCC</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  ${CUDA_NVCC_INCLUDE_ARGS}</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  )</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">if(CUDA_result)</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  message(FATAL_ERROR &quot;Error generating ${generated_file}&quot;)</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">endif()</font></div>

</div><div style="font-family: verdana, sans-serif; "><br></div><div><font class="Apple-style-span" face="verdana, sans-serif">It seems that deeper directory structure of ITK4 is pushing this command in &quot;</font><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">Spine_generated_LHstuff.cu.obj.cmake</font><span class="Apple-style-span" style="font-family: verdana, sans-serif; ">&quot; over some limit (possibly 255 characters). Do you have any suggestions how to resolve this issue?</span></div>

<div style="font-family: verdana, sans-serif; "><br></div><div style="font-family: verdana, sans-serif; ">Regards,</div><div style="font-family: verdana, sans-serif; ">Dženan</div></font></div>