MantisBT - CMake
View Issue Details
0014529CMakeCMakepublic2013-10-31 10:382016-06-10 14:31
Petr Kmoch 
Kitware Robot 
normalminoralways
closedmoved 
Windows
CMake 2.8.11 
 
0014529: Leading UNC slashes stripped if include path contains repeated slashes
When a UNC path includes repeated slashes, CMake replaces all repeated slashes by single slashes, including the ones at the beginning. The net effect is the path is no longer a UNC path in the generated buildsystem.
include_directories(//unc/path_which/contains/repeated//slashes)
add_executable(foo ...)

#

The include path will be listed as "\unc\path_which\contains\repeated\slashes" in the generated foo.vc[x]proj.
I've seen this behaviour with VS8 and VS10 generators when setting a UNC path in include_directories(). I haven't tested this in other path-handling scenarios.
No tags attached.
Issue History
2013-10-31 10:38Petr KmochNew Issue
2013-11-01 10:38Brad KingNote Added: 0034305
2013-11-01 10:47Petr KmochNote Added: 0034306
2013-11-01 11:08Brad KingNote Added: 0034307
2016-06-10 14:29Kitware RobotNote Added: 0042408
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0034305)
Brad King   
2013-11-01 10:38   
It looks like the ConvertToUnixSlashes "hasDoubleSlash" logic:

 http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/kwsys/SystemTools.cxx;hb=v2.8.12#l1732 [^]

which is left from pretty early days does not account for both leading // and a // elsewhere in the path.
(0034306)
Petr Kmoch   
2013-11-01 10:47   
Also note that I able to "work around" this by starting the UNC path with a quadruple slash (it ended up with a normal double \\ in the vcxproj). So perhaps more-than-two slashes are somehow handled incorrectly as well.
(0034307)
Brad King   
2013-11-01 11:08   
Someone needs to teach ConvertToUnixSlashes to use SplitPathRootComponent to deal with the root component and then replace all occurrences of more than one consecutive slash with a single slash for the rest of the path.
(0042408)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.