file(TO_CMAKE_PATH) alters leading // haphazardly
This issue was created automatically from an original [Mantis Issue](https://cmake.org/Bug/view.php?id=9182). Further discussion may take place here. --- Take the following test case: ```cmake 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)
issue