[cmake-developers] Introduce 'Unix Ninja' generator

Daniel Levin dendy.ua at gmail.com
Thu Jan 22 10:34:18 EST 2015


I played a bit more and finally came with solution that works for me with
standard Ninja generator for QNX SDK.

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.
2. In custom build rules instead of launching .sh scripts directly shell
should be specified explicitly.

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.

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.


On Tue, Jan 20, 2015 at 1:18 PM, Brad King <brad.king at kitware.com> wrote:

> On 01/20/2015 01:04 PM, Daniel Levin wrote:
> > Brad King wrote:
> >> We expect that environment variables required by the toolchain
> >> in use are already loaded.
> > configure everything once, save into cache, build with single
> > invocation of build tool
>
> Use of a developer-provided environment was a very early and quite
> fundamental design decision, and is unlikely to be changed.
>
> I'd rather this discussion focus on how to get a sh-based ninja
> working for your environment.  Unfortunately without access to
> such an environment myself I do not understand it well enough to
> suggest the best approach.
>
> Can you provide sample ninja build files (perhaps hand written)
> that demonstrate invocations of the compiler and other tools,
> assuming it runs with the proper environment already defined?
>
> -Brad
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150122/c199b180/attachment.html>


More information about the cmake-developers mailing list