<div dir="ltr">I played a bit more and finally came with solution that works for me with standard Ninja generator for QNX SDK.<div><br></div><div>1. In my toolchain file if ( CMAKE_HOST_WIN32 AND NOT "${CMAKE_GENERATOR}" STREQUAL "Unix Makefiles" ) then I will generate .bat wrapper around compiler instead of .sh.</div><div>2. In custom build rules instead of launching .sh scripts directly shell should be specified explicitly.<br></div><div><br></div><div>I predict that answer about (1) will be the same: load environment before launching build. I would want to start another thread to discuss this issue, because it sounds critical to me.<br></div><div><br></div><div><div>About "Unix Ninja". I believe the main reason for the "Unix Makefiles" was the fact that some make tools can handle Unix syntax only. From my point of view it also means Unix environment. That is why I still think even if Ninja tool has single syntax, when running it under Unix environment it still make sense to force Ninja to use sh as shell.</div></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 20, 2015 at 1:18 PM, Brad King <span dir="ltr"><<a href="mailto:brad.king@kitware.com" target="_blank">brad.king@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 01/20/2015 01:04 PM, Daniel Levin wrote:<br>
<span class="">> Brad King wrote:<br>
>> We expect that environment variables required by the toolchain<br>
>> in use are already loaded.<br>
</span><span class="">> configure everything once, save into cache, build with single<br>
> invocation of build tool<br>
<br>
</span>Use of a developer-provided environment was a very early and quite<br>
fundamental design decision, and is unlikely to be changed.<br>
<br>
I'd rather this discussion focus on how to get a sh-based ninja<br>
working for your environment.  Unfortunately without access to<br>
such an environment myself I do not understand it well enough to<br>
suggest the best approach.<br>
<br>
Can you provide sample ninja build files (perhaps hand written)<br>
that demonstrate invocations of the compiler and other tools,<br>
assuming it runs with the proper environment already defined?<br>
<span class="HOEnZb"><font color="#888888"><br>
-Brad<br>
<br>
</font></span></blockquote></div><br></div>