[cmake-developers] [PATCH 0/3] The CMake Ninja generator.

Nicolas Desprès nicolas.despres at gmail.com
Wed Nov 23 05:59:04 EST 2011


2011/11/22 Peter Collingbourne <peter at pcc.me.uk>

> On Fri, Nov 18, 2011 at 10:02:54AM +0100, Nicolas Desprès wrote:
> > On Wed, Nov 16, 2011 at 3:05 PM, OKUMURA Yuki <mjt at cltn.org> wrote:
> >
> > > (Sorry Bill, i repost here..)
> > >
> > > 2011/11/16 Bill Hoffman <bill.hoffman at kitware.com>:
> > > - snip -
> > > > What type of evolution will Ninja need?   I suppose it could use
> cmake
> > > > scripts and exectue_process which can do && type things pretty easy.
> > >
> > > Why not insert "cmd /c" everywhere? :)
> > > Anyway, i had tried this in early this month,
> > >
> > >
> https://github.com/okuoku/CMake/commit/db19df03606684f313c9e86b313218feee9cce3f
> > > but it didn't work well.
>
> How so?  Was there an escaping issue?  The cmd.exe documentation seems
> to indicate that this will work.
>
>
> http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shelloverview.mspx#EBG
>
> > >
> > > I think almost all use of "&&" is just "chdir /d $workdir &&
> > > compile/link-command." So, adding $workdir
> > > specifier to target syntax of Ninja might work for many cases.
> > >
> >
> > That's right. I just had a look at the build.ninja file generated by the
> > Ninja Generator and it actually uses && only for changing the working
> > directory.  I will suggest a patch to Ninja to support working directory
> > for each build statement.
>
> That's not the only thing that the Ninja generator uses && for.
> It also uses && to prepend/append PRE_BUILD, PRE_LINK and POST_BUILD
> commands to the link command, and to concatenate multiple custom
> command lines.
>

True. I realized that. Actually, it seems that cmd.exe have some sort of
support for && and || so maybe it would work. I have to try.

Cheers,

-- 
Nicolas Desprès
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20111123/32565e6e/attachment.html>


More information about the cmake-developers mailing list