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

Peter Collingbourne peter at pcc.me.uk
Tue Nov 22 14:01:12 EST 2011


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.

Thanks,
-- 
Peter



More information about the cmake-developers mailing list