[CMake] Bug with ninja generator on windows using CMake 2.8.11.1

Malfettone, Kris Kris.Malfettone at sig.com
Mon Sep 23 16:58:23 EDT 2013


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130923/eb13e529/attachment.htm>


More information about the CMake mailing list