On Wed, Jan 6, 2016 at 6:25 PM, Ben Boeckel <ben.boec...@kitware.com> wrote:
> 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). > Is that variable already available or a name suggestion? I cannot find any reference to it neither in the source nor in the documentation. > > 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? > This is acceptable for me since I have a custom generator that would write the top build.ninja containing "subninja sub/build.ninja". The end-user is supposed to run ninja from the top directory not from the top/sub/ directory. -- Nicolas Desprès
-- 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