MantisBT - CMake
View Issue Details
0011313CMakeCMakepublic2010-10-14 14:012011-01-24 10:21
K. R. Walker 
Brad King 
normalblockalways
closedfixed 
Windows / Visual Studio 2005
CMake-2-8 
CMake 2.8.3 
0011313: CMake cannot find files specified with extended-length paths.
CMake 2.6.x and 2.8.0 and Visual Studio 2005 seem to work with extended-length paths. e.g.,

add_library( name //?/C:/foo/bar/file.cpp )

but CMake 2.8.2 reports:

CMake Error in C:/foo/bar/CMakeLists.txt: Cannot find source file "file.cpp".

Extended-length path support needed to support deep hierarchies.
"To specify an extended-length path, use the "\\?\" prefix."
-- http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx [^]
No tags attached.
related to 0011023closed  cmake-gui doesn't support a source directory over a mapped network drives in Windows. 
Issue History
2010-10-14 14:01K. R. WalkerNew Issue
2010-10-19 19:25K. R. WalkerNote Added: 0022545
2011-01-21 19:10David ColeAssigned To => Brad King
2011-01-21 19:10David ColeStatusnew => assigned
2011-01-24 10:19Brad KingRelationship addedrelated to 0011023
2011-01-24 10:21Brad KingNote Added: 0025024
2011-01-24 10:21Brad KingStatusassigned => closed
2011-01-24 10:21Brad KingResolutionopen => fixed
2011-01-24 10:21Brad KingFixed in Version => CMake 2.8.3

Notes
(0022545)
K. R. Walker   
2010-10-19 19:25   
It looks like kwsys/SystemTools.cxx is changing "//?/C:/foo/bar/baz.cpp" to "/?//". This could be a workaround:

kwsys_stl::string SystemTools::GetActualCaseForPath(const char* p)
{
 #ifndef _WIN32
   return p;
 #else
+ if( 0 == strncmp( p, "//?/", 4 ) ) {
+ return p;
+ }
(0025024)
Brad King   
2011-01-24 10:21   
This was caused by this commit:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=018c13ff [^]

A related problem was reported in issue 0011023. This was fixed by

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0f5189d1 [^]

and released in CMake 2.8.3.