<div dir="ltr">Brian,<div><br></div><div>We understand that this is both annoying and inconvenient, but unfortunately<br></div><div>it is outside of ITK&#39;s control, since it is really the consequence of a limitation</div>
<div>in Visual Studio.</div><div><br></div><div>As Matt pointed out, the warning is an accurate one, and saves you from some<br></div><div>pains later in the process.</div><div><br></div><div>As  Andras also pointed out, Visual Studio will silently truncate the command</div>
<div>line without giving you any warning. The result would be that: Include directories,</div><div>or Link directories will be silently excluded from the built lines, and then you will</div><div>received compilation or link error messages that would be hard to interpret and/or</div>
<div>resolve.</div><div><br></div><div>Note that the problem happens because source and build paths appear many</div><div>times in the Visual Studio project file. </div><div><br></div><div><div>To make more sense of the source of the problem, you may find useful to open</div>
<div>the Visual Studio projects into a text editor and see how many times the paths</div><div>are composed into the build rules.</div></div><div><br></div><div><br></div><div><br></div><div>All that said, one intermediate, palliative option is to:</div>
<div><br></div><div>1) Build ITK in a very short path.</div><div><br></div><div>         E.g. C:\ITK-4.5   </div><div><br></div><div>    could be a good option.</div><div><br></div><div>Then once it finishes building, </div>
<div><br></div><div>2) Install it in a destination directory,</div><div>    which can be a bit longer. </div><div><br></div><div>3) Build your application against this installed ITK.</div><div><br></div><div><br></div><div>
The advantage of doing this installation, is that the header files will all be put </div><div>in a single directory, and then the full set of directories that have to be passed</div><div>to an application will be smaller.</div>
<div><br></div><div>Note that even in this case, the destination directory path shouldn&#39;t be</div><div>too long, since then you would have transferred the Visual Studio</div><div>limitation from the ITK build to the build of your project, where you</div>
<div>are using ITK.</div><div><br></div><div><br></div><div><br></div><div>  Regards,</div><div><br></div><div>       Luis</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Dec 16, 2013 at 10:34 AM, Brian Davis <span dir="ltr">&lt;<a href="mailto:bitminer@gmail.com" target="_blank">bitminer@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">After trying to build latest version of ITK I ran into this build issue<br><div><br>CMake Error at CMakeLists.txt:28 (message):<br>
  ITK build directory path length is too long (56 &gt; 50).Please set the ITK<br>
  build directory to a directory with a shorter path.<br><br>Where I have specified:<br><br>Source code:<br>C:\projects\dsa4d\ctutil_3rdParty\source\itk-4.4.2<br>Build the binaries<br>C:/projects/dsa4d/ctutil_3rdParty/source/itk-4.4.2/build<br>

<br></div><div>Which I do not think is unreasonable for a path when I want a projects dir, project name dir, and branch name dir.  But whoa was I ever wrong.<br><br></div><div>After reading the filed bug:<br></div><div><br clear="all">

<a href="http://www.cmake.org/Bug/view.php?id=14262" target="_blank">http://www.cmake.org/Bug/view.php?id=14262</a><br><br></div><div>which was posted in 2013... pretty recent considering that I have build ITK in paths much worse that above and it worked just fine. <br>

<br>I am left in dumbfounded amazement that this bug was closed with reason:<br><br>&gt;&gt; ======<br><a name="142fc0bc9798ed1b_bugnotes">The error message comes from CMakeLists.txt code in ITK, not from CMake.  <br>
<br>
Furthermore, the limit comes from path lengths used within ITK&#39;s source 
and build trees that exceed the Windows maximum path length limit (VS 
hits these internally during the build).  You simply can&#39;t build ITK in a
 longer path.<br>
<br>
Either way, this is not a CMake issue so I&#39;m resolving it as &quot;no change required&quot;.</a><br>&gt;&gt; ======<br><br></div><div>Well we simply built it prior 2013 in longer paths so it simply can be built!  What changed?<br>

</div><div><br></div><div>Wow that&#39;s great!  Should I change my path to C:\  ???  .... I am going to get on that right now.<br><br></div></div>
<br>_______________________________________________<br>
Community mailing list<br>
<a href="mailto:Community@itk.org">Community@itk.org</a><br>
<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/community" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/community</a><br>
<br></blockquote></div><br></div>