[cmake-developers] Using CMake generated ninja file as a subninja file

Nicolas Desprès nicolas.despres at gmail.com
Tue May 17 13:42:28 EDT 2016


On Tue, May 17, 2016 at 4:23 PM, Brad King <brad.king at kitware.com> wrote:

> On 05/13/2016 07:19 PM, Nicolas Desprès wrote:
> > Ok. See the new implementation
>
> Thanks.  I've rebased your topic on 'master' after the style transition
> commit and updated the style accordingly.  Then I split the topic up into
> more commits and simplified the prefix insertion logic a bit.
>
> I've merged the topic to 'next' for testing here:
>
>  Merge topic 'ninja-output-path-prefix' into next
>  https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=48d6c426
>
> It consists of a series of minor cleanups/refactoring/fixes followed
> by the main two commits:
>
>  Ninja: Pass all build paths through a central method
>  https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=038e7716
>
>  Ninja: Support embedding of CMake as subninja project
>  https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8a862a4d
>
> Please review the revised approach.
>

That's great! The code is way cleaner this way. I have tested it with my
generator and it works fine.


>
> > But the ExportImport and Plugin tests are likely to fail when used with
> > this new feature. I can't figure out right now how to add a test for this
> > without duplicating the Plugin and ExportImport test into
> RunCMake/Ninja/.
>
> This is still the case, but I think it can be tackled as a follow-up
> effort.  The cmGlobalNinjaGenerator::NinjaOutputPath method could
> just be hacked to skip "paths" starting in `-Wl,` (or even just `-`)
> to handle the specific corner case.
>

I did not figure out a better way to handle this corner case. I have no
strong requirements on this corner case at the moment, so I am ok to tackle
it later.

Thanks a lot for your help,
-Nico
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160517/995d7c60/attachment.html>


More information about the cmake-developers mailing list