[Insight-developers] compilation error with msvc 8.0

Arnaud Gelas arnaudgelas at gmail.com
Mon Jun 18 11:23:38 EDT 2012


Brad,

We were in the case 1) and we wrongly assumed that was also fixed for
previous versions of microsoft visual studio.

We are now recompiling by turning OFF CMAKE_USE_RELATIVE_PATHS.

Thanks for the link with respect to the VS 10 issues, interesting to learn
about it!

Thanks,
Arnaud

On Mon, Jun 18, 2012 at 5:00 PM, Brad King <brad.king at kitware.com> wrote:

> On 06/18/2012 09:40 AM, Arnaud Gelas wrote:
> >
> http://www.itk.org/pipermail/insight-developers/2011-March/017812.html
> >
> > These errors occurred with a recent version of cmake (2.8.8), so I am a
> > little confused here.
>
> The underlying problem is that VS does this with a relative path:
>
>
>  c:\path\to\directory\with\project\file\..\..\..\relative\path\on\top\of\that\to\source.cpp
>
> and then fails when the total string is over 250 characters or so
> even though the collapsed full path would be well under the limit.
>
> This is only a problem when CMake stores relative paths in the
> project files, but we normally prefer full paths.  AFAIK for
> VS 8 CMake stores relative paths under only two circumstances:
>
> (1) The unsupported option CMAKE_USE_RELATIVE_PATHS is on.
>
> (2) The sequence of "..\" is not long enough to escape the
>    top-level of the build tree (CMAKE_BINARY_DIR).
>
> Is either of these the case for your build?
>
> ----------------------------------------------------------------------
> FYI, the fix referenced in the thread you linked was for VS 10 only:
>
>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ed0075bd
>
> There is a lot more to it as covered here:
>
>  http://www.cmake.org/Bug/view.php?id=12570
>
> but that should not affect VS 8.  There is extra trouble with VS 10
> because it has one bug for relative paths and another bug for full
> paths.
>
> -Brad
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-developers/attachments/20120618/bf914435/attachment.htm>


More information about the Insight-developers mailing list