[CMake] Cmake 2.8.2 Bug under windows

J Decker d3ck0r at gmail.com
Fri Aug 13 14:45:12 EDT 2010


On Fri, Aug 13, 2010 at 11:24 AM, Brad King <brad.king at kitware.com> wrote:
> On 8/12/2010 8:36 PM, J Decker wrote:
>>
>> cmake -G "MinGW Makefiles" /test
>
> The path "/test" is not a valid full path on windows.

yes it is.  and the forward slash or backslash is handled perfectly by
all windows internals - it's only windows command prompt that had an
issue cause it uses '/' as an option identifier.  The system itself
allows // or \\ or / or \ anywhere / or \ appear.

Not specifying the drive is also valid - it means use the current drive.

> That syntax is used by many tools for command line options.
> If I use a backslash instead:
>
>  cmake -G "MinGW Makefiles" \test
>
> I get
>
> CMake Error: The source directory "C:/build/test" does not exist.
> Specify --help for usage, or press the help button on the CMake GUI.
>
> IMO the only bug here is that CMake does not complain that
> the given path is malformed.  Take a look at Source/cmake.cxx
> in the method "cmake::SetDirectoriesFromFile".  The path should
> be the argument to this method.  Somewhere in this function
> before it does a call to SetHomeDirectory should be taught to
> catch this.
>
> -Brad
>


More information about the CMake mailing list