[cmake-developers] Introduce 'Unix Ninja' generator

Brad King brad.king at kitware.com
Mon Jan 19 14:50:06 EST 2015


On 01/16/2015 01:13 PM, Daniel Levin wrote:
> The CMake and Ninja were part of the bigger build script,
> which was running under the QNX SDK sh.exe.
> When running under this shell it overrides some environment
> variables (compare attached files).

The main differences I see are:

* The Windows shell is a 64-bit cmd and the MSYS one is 32-bit
* PATH has been converted to MSYS-style and prepended with /usr/bin
* Added: QNX_HOST=c:\opt\qnx650-gcc-4.8.1\host\win32\x86
* Added: QNX_TARGET=c:\opt\qnx650-gcc-4.8.1\target\qnx6
* Added: TERM=cygwin, consistent with MSYS shells
* Added: SHLVL=1
* The "TEMP" and "TMP" variables are /tmp instead of the Windows dirs

So this is a MSYS shell.  AFAIK ninja under MSYS sh.exe normally
works even for pure Windows builds.  Perhaps their shell does more.

> But as far as I remember it also does some nasty launcher overrides,
> intercepting calls to cmd, bat and sh and tries to process them
> somehow else.

Do you mean some kind of dll injection to intercept CreateProcess calls?

I'd really like to have a deep understanding of the situation before
adding a lot of escaping code for a specialized environment.  It
may be that ninja simply needs to learn how to isolate itself in
this case.

Thanks,
-Brad


More information about the cmake-developers mailing list