On Wed, Jan 06, 2016 at 11:14:32 +0100, Nicolas Desprès wrote: > To enable this type of generation, the "top/" directory must be passed to > CMake somehow. An environment variable or a CMake variable called > CMAKE_NINJA_TOP_BUILD_DIR would do the trick.
I think CMAKE_NINJA_OUTPUT_PATH_PREFIX would work fine (passed as a -D on the command line). Note that the ninja file CMake generates is then invalid except as a subninja file (since the build rules paths won't line up from its directory). I don't know how acceptable that would be. Maybe a separate Subninja generator which uses it and writes out a build.subninja file instead? --Ben -- 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