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

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to