Windows path bug when configuring with relative path
Testcase:
To reproduce and test:
- Copy the above two files to a directory, on a drive other than
C:
. In my case, this wasV:\test
Using a VS2015 command prompt with CMake 3.6.0:
-
Build directory
V:\t1\
-
run
cmake V:\test
, open the solution in Visual Studio -
in the "solution explorer", try to open
Documentation/doc-xml/doc.xml
; it works -
Build directory
V:\t2\
-
run
cmake \test
, open the solution in Visual Studio -
in the "solution explorer", try to open
Documentation/doc-xml/doc.xml
; it fails with the error: "Could not find a part of the path 'C:\test\doc.xml'"
It looks like if you configure with a drive letter+absolute path then the paths are correct. But if you configure with an absolute path only (no drive letter), then it's not adding the drive to the path. It looks like the path should always include the drive letter.
Oddly, the solution builds successfully from within the IDE--the standard targets are all OK. It seems to be limited to SOURCES in custom targets (though other bits I haven't tested might also be affected).