CodeBlocks: Drive letter missing on Windows
On Windows, there is some minor inconsistency in treating a leading backspace '' character for the source path, when using the "CodeBlocks + minGW makefile" generator.
Example project structure:
d:\dev\builddir\ (empty; we run cmake + make from here) d:\projects\srcdir\ (project source repo)
from the CLI, running
d:\dev\builddir> cmake-gui \projects\srcdir
will generate correct makefiles which work as intended, but a broken .cbp file that has relative paths for every source file, (in the .cbp XML, they are noted as
<Unit filename="/projects/srcdir/....."> .
These paths are then appended by CodeBlocks to the builddir absolute path. This of course results in an unusable .cbp project file where none of the source files can be located.
The obvious workaround is to instead use
cmake-gui d:\projects\srcdir with the full absolute path, but I believe the first form is correct and should be treated as an absolute path, just as the windows CLI does.
I have a minimal test case uploaded here: https://gitlab.kitware.com/fenugrec/cmake_tests/tree/master/cbp_gen/orig_src