[cmake-developers] [PATCH] Use full path for all source files in ninja build.

Chaoren Lin aoe at google.com
Wed Aug 3 16:37:00 EDT 2016


> What about instead of "cd path && ninja", using "ninja -C path"?

I suppose we can also change "cmake --build path", to use "ninja -C path"
instead of "cd path && ninja",
but making ninja always use full paths for source files would have these
benefits:

   1. consistency with make (as pointed out by Brad)
   2. consistency regardless of where the build directory is located (in
   source, under source, or out of source)
   3. all three ways of invoking the build would work for IDEs (cmake
   --build, cd && ninja, ninja -C),
   so future IDE writers won't run into the sample problem no matter which
   way they choose


On Wed, Aug 3, 2016 at 1:12 PM, Ben Boeckel <ben.boeckel at kitware.com> wrote:

> On Wed, Aug 03, 2016 at 11:11:45 -0700, Chaoren Lin wrote:
> > Also, in the case of vim, the makeprg is user-supplied, so vim has no
> idea
> > that it contains a path.
>
> What about instead of "cd path && ninja", using "ninja -C path"?
>
> --Ben
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160803/02fb7335/attachment.html>


More information about the cmake-developers mailing list