[CMake] Bug with ninja generator on windows using CMake 2.8.11.1
Petr Kmoch
petr.kmoch at gmail.com
Tue Sep 24 02:59:17 EDT 2013
Hi.
I would just add that this is actually doable in one command - Windows 'cd'
accepts option '/D' which means "also change the drive, if applicable."
CMake would have to issue it, though.
Petr
On Mon, Sep 23, 2013 at 10:58 PM, Malfettone, Kris
<Kris.Malfettone at sig.com>wrote:
> I am experiencing what I consider a bug with the Ninja generator on
> Windows. I am using CMake 2.8.11.1 and I believe the latest Ninja from
> github. However, I do not believe this to be version specific.
>
>
>
> Some of my builds use add_custom_command specifying WORKING_DIRECTORY as
> an argument. When I have WORKING_DIRECTORY set to a directory on a drive
> that is not the same as my CMake build directory ninja builds will fail
> because it attempts to set the working directory by simply cd’ing to the
> WORKING_DIRECTORY. In the windows cmd prompts this will fail because you
> need to issue 2 commands. For instance if my CMake build directory is on
> C:\build_dir and the working directory is on Z:\working_dir ninja should
> issue:
> Z:
>
> cd Z:\working_dir
>
> instead of just:
> cd Z:\working_dir
>
>
>
> The annoying part of the bug is that the cd to Z:\working_dir command
> technically succeeds but doesn’t change the current working directory.
> Then the custom command itself will fail rather than the ninja command
> trying to cd because it is in the wrong working directory.
>
>
>
> Am I mistaken or is this the behavior that others experience as well?
>
>
>
> I imagine this would be an easy bug to fix and since I do these types of
> builds often it would be very much appreciated if it was.
>
>
>
> -Kris Malfettone
>
> ------------------------------
>
> IMPORTANT: The information contained in this email and/or its attachments
> is confidential. If you are not the intended recipient, please notify the
> sender immediately by reply and immediately delete this message and all its
> attachments. Any review, use, reproduction, disclosure or dissemination of
> this message or any attachment by an unintended recipient is strictly
> prohibited. Neither this message nor any attachment is intended as or
> should be construed as an offer, solicitation or recommendation to buy or
> sell any security or other financial instrument. Neither the sender, his or
> her employer nor any of their respective affiliates makes any warranties as
> to the completeness or accuracy of any of the information contained herein
> or that this message or any of its attachments is free of viruses.
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130924/b3f37019/attachment-0001.htm>
More information about the CMake
mailing list