[cmake-developers] Introduce 'Unix Ninja' generator

Brad King brad.king at kitware.com
Thu Jan 22 11:27:37 EST 2015


On 01/22/2015 10:34 AM, Daniel Levin wrote:
> finally came with solution that works for me with standard Ninja
> generator for QNX SDK.

Great!

> 2. In custom build rules instead of launching .sh scripts directly
> shell should be specified explicitly.

This is expected for any Windows platform that wants to run scripts.
Windows does not support shebang lines so the interpreter must always
be specified explicitly.

> 1. In my toolchain file...I will generate .bat wrapper around compiler
> instead of .sh.
> 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.

As I said in earlier responses this is simply a requirement and is not
likely to change.  I understand your desire to automate the environment,
but I do not think CMake is the right level to achieve that.

> About "Unix Ninja". I believe the main reason for the "Unix Makefiles"
> was the fact that some make tools can handle Unix syntax only.

The "Unix Makefiles" generator refers exactly to unix-style make tools,
and on POSIX systems is the only generator besides Ninja (excluding the
"extra" generators that use makefiles+project files).  It is available
on Windows because there are make tools on Windows that work with such
paths/shells natively.  Unless ninja were to have a variant that does
so too, then it does not need a distinct generator.

-Brad



More information about the cmake-developers mailing list