[CMake] CMake, Visual studio 2005 and long relative path
Armin Berres
trigger at space-based.de
Sat Jan 10 10:20:43 EST 2009
On Thu, 08 Jan 09 14:56, Julien Michel wrote:
> Dear CMake users and developpers,
>
> My project is using cmake and I am trying to build it on Visual Studio
> 2005. The configuration process is successful, but when trying to
> compile, I have a long bunch of fatal C1083 error :
>
> fatal error C1083: impossible to open source file:
> '../../../../../../../../../../Path-to-the-source-file' no such file or
> directory.
>
> But when manually testing, the file is where visual is looking for it.
>
> After some more testing, it appears that windows does not recognize
> files if there are too many '../' in the path (even if the total path
> length does not exceed 150 characters).
>
> Is this a known limitation of visual, or due to a cmake recent update ?
> I did not meet this problem before, and my project did not change that
> much ...
>
> Any clue of what is going wrong ?
See <http://msdn.microsoft.com/en-us/library/aa365247.aspx>. The max
length of a path in windows is 260 characters. I didn't believe it when
I stumbled the first time over this problem, but it is really true.
I 'solved' the problem by telling everybody to checkout in a directory
nearc C:/ ;)
I have seperated build and source files here, so I have to use "../../"
in all the cmake files. Do you use Qt? A recent change was, that "../"
is now handled properly when moccing files, but the paths are getting
longer.
Greetings,
Armin
More information about the CMake
mailing list