[cmake-developers] Introduce 'Unix Ninja' generator

Daniel Levin dendy.ua at gmail.com
Thu Jan 22 11:54:33 EST 2015


> 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.

At the same CMakeLists.txt is supposed to be portable. I assume any time
build rule is added shell should be always specified explicitly unless
executable file can be executed natively on all platforms.

> As I said in earlier responses this is simply a requirement and is not
> likely to change.

I would want to understand origins of this requirement. Let me describe my
thoughts in separate thread to avoid offtopic.



On Thu, Jan 22, 2015 at 11:27 AM, Brad King <brad.king at kitware.com> wrote:

> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150122/cb02deb7/attachment.html>


More information about the cmake-developers mailing list