MantisBT - CMake
View Issue Details
0009182CMakeCMakepublic2009-06-19 09:292016-06-10 14:30
Gavin Beatty 
Bill Hoffman 
normalminorhave not tried
closedmoved 
CMake-2-6 
 
0009182: file(TO_CMAKE_PATH) alters leading // haphazardly
Take the following test case:

macro(macro_test _in)
    file(TO_CMAKE_PATH "${_in}" _out)
    message(STATUS "${_in} => ${_out}")
endmacro(macro_test _in _out)
macro_test("//hello/")
macro_test("//hello//")

the output is:
-- //hello/ => //hello
-- //hello// => /hello

Why does the leading // disappear with the second input?

CMake should never alter the number of leading '/'s or at least should never reduce from >1 to 1 (on POSIX a leading // is left to the implementation to handle as it wishes, e.g., with CIFS)
No tags attached.
Issue History
2009-06-19 09:29Gavin BeattyNew Issue
2009-06-19 09:43Gavin BeattyNote Added: 0016741
2009-09-14 13:17Bill HoffmanStatusnew => assigned
2009-09-14 13:17Bill HoffmanAssigned To => Bill Hoffman
2016-06-10 14:27Kitware RobotNote Added: 0041571
2016-06-10 14:27Kitware RobotStatusassigned => resolved
2016-06-10 14:27Kitware RobotResolutionopen => moved
2016-06-10 14:30Kitware RobotStatusresolved => closed

Notes
(0016741)
Gavin Beatty   
2009-06-19 09:43   
The above occurs with CMake-2.6.4 on SuSE Linux (SLES 10.1) compiled from source.
(0041571)
Kitware Robot   
2016-06-10 14:27   
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.