[cmake-developers] -GNinja on Windows

Peter Kümmel syntheticpp at gmx.net
Mon Jun 11 22:49:32 EDT 2012


On 12.06.2012 04:33, Bill Hoffman wrote:
> On 6/11/2012 10:21 PM, Peter Kümmel wrote:
>> All tests pass now for MSVC and MinGW!
>>
>> With some small patches for ninja:
>> https://github.com/syntheticpp/ninja/commits/ninja-for-cmake
>>
>> The changes are only needed for msvc when the build
>> dir path contains spaces, and for mingw because of slashes
>> in path names.
>>
>
> Great work.  Nice to see.  What are the chances of those changes being
> accepted upstream?   I am a bit concerned about the quote stuff.

The patches are not critical, but there's not much traffic the last days.

> Putting quotes in and then taking them out.  Where do the quotes come
> from?  Is there another way to put paths with spaces into ninja?

Yes sounds strange, but atm I've no better idea, ninja adds the quotes
because it internally has a space separated list, see the link in my
comment in merge request:

https://github.com/martine/ninja/pull/324

But I think the patch is straight forward. The Win32 functions simply don't
need them, even worse they reject the quoted path as "Invalid argument".


> Most of the tests except the depend stuff was passing with spaces in the path
> before these changes.  Is this all about the .d file contents?

Yes, ninja can't open the .d files when they are "behind" a space and stops.
It works when your build folder has no spaces.

The other patch also isn't critical.
https://github.com/martine/ninja/pull/322

It's like a fall back.

Peter



More information about the cmake-developers mailing list