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

2012-01-26 Thread Nicolas Desprès
On Thu, Jan 26, 2012 at 4:47 AM, Peter Collingbourne  wrote:
> On Tue, Jan 03, 2012 at 01:15:17AM +, Peter Collingbourne wrote:
>> On Sat, Nov 12, 2011 at 02:36:04AM +, Peter Collingbourne wrote:
>> > Hi,
>> >
>> > These patches add the Ninja generator to CMake, which I am now
>> > proposing for inclusion in mainline.
>> [...]
>> > This patch series is also available from my git repository:
>> > git://github.com/pcc/CMake.git ninja-generator-pr
>>
>> I've now updated the above repository with the changes suggested in
>> this thread.
>>
>> Is there anything else required for this to be merged to next?
>
> Ping.
>
> Branch has been updated with miscellaneous fixes for Mac OS X bringing
> the total number of test failures on a Mac down to 4.  I don't have
> time to fix the rest (which mainly relate to the construction of
> apps/bundles/frameworks) so I will leave this to anyone who cares
> enough about OS X to fix.
>

I have a Mac available. I will have a look.

Cheers,
Nico
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


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

2012-01-25 Thread Peter Collingbourne
On Tue, Jan 03, 2012 at 01:15:17AM +, Peter Collingbourne wrote:
> On Sat, Nov 12, 2011 at 02:36:04AM +, Peter Collingbourne wrote:
> > Hi,
> > 
> > These patches add the Ninja generator to CMake, which I am now
> > proposing for inclusion in mainline.
> [...]
> > This patch series is also available from my git repository:
> > git://github.com/pcc/CMake.git ninja-generator-pr
> 
> I've now updated the above repository with the changes suggested in
> this thread.
> 
> Is there anything else required for this to be merged to next?

Ping.

Branch has been updated with miscellaneous fixes for Mac OS X bringing
the total number of test failures on a Mac down to 4.  I don't have
time to fix the rest (which mainly relate to the construction of
apps/bundles/frameworks) so I will leave this to anyone who cares
enough about OS X to fix.

Thanks,
-- 
Peter
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


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

2012-01-02 Thread Peter Collingbourne
On Sat, Nov 12, 2011 at 02:36:04AM +, Peter Collingbourne wrote:
> Hi,
> 
> These patches add the Ninja generator to CMake, which I am now
> proposing for inclusion in mainline.
[...]
> This patch series is also available from my git repository:
> git://github.com/pcc/CMake.git ninja-generator-pr

I've now updated the above repository with the changes suggested in
this thread.

Is there anything else required for this to be merged to next?

Thanks,
-- 
Peter
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


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

2011-11-23 Thread Nicolas Desprès
2011/11/22 Peter Collingbourne 

> 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  wrote:
> >
> > > (Sorry Bill, i repost here..)
> > >
> > > 2011/11/16 Bill Hoffman :
> > > - 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
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

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

2011-11-22 Thread Peter Collingbourne
On Tue, Nov 22, 2011 at 09:21:59PM +0100, Alexander Neundorf wrote:
> On Tuesday 22 November 2011, Peter Collingbourne wrote:
> > On Tue, Nov 15, 2011 at 06:54:01PM +0100, Nicolas Desprès wrote:
> > > On Tue, Nov 15, 2011 at 5:29 PM, Bill Hoffman 
> wrote:
> > > > On 11/11/2011 9:36 PM, Peter Collingbourne wrote:
> > > >  Note that this generator is *nix only (it relies on POSIX shell
> > > >  
> > > >> functionality), and will only be built on *nix platforms.  I am not
> > > >> interested in Windows support, but I understand that others have
> > > >> expressed an interest in adding support.
> > > >> 
> > > >>  How much of the POSIX shell stuff can be done with cmake -E stuff? 
> > > >>  It
> > > > 
> > > > would be good to use as little POSIX stuff as possible as someday when
> > > > someone does the inevitable windows port it is easier...
> > > 
> > > Too much in my opinion. Specially the && operator of the shell. Using
> > > cmake -E is the first step. I am planning to suggest an evolution of
> > > Ninja to fix this issue. Actually, it is the main issue which stop me
> > > while writing the beginning of this generator.
> > 
> > Other than && we also have:
> > 
> > rm -f $file -- used to delete static library archives before rebuilding
> 
> cmake -E remove -f $file

I can't see a cmd.exe builtin with the same semantics as rm -f.
But it looks like the -f flag causes cmake to exit with a status
of 0 regardless of whether it was able to remove the file, which is
probably not what we want.  "cmake -E remove $file" should work.

> > :   -- used as a no-op command
> 
> maybe
> cmake -E echo

I don't think that we should spawn another process just for a no-op,
especially on Windows where process creation is expensive.  We should
use a shell builtin for this.  I can't see a cmd.exe builtin which
is explicitly a no-op, but perhaps a builtin with no effect such as
"echo off" would work.

Anyway, that change should be done by whoever does the Windows port.

Thanks,
-- 
Peter
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


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

2011-11-22 Thread Alexander Neundorf
On Tuesday 22 November 2011, Peter Collingbourne wrote:
> On Tue, Nov 15, 2011 at 06:54:01PM +0100, Nicolas Desprès wrote:
> > On Tue, Nov 15, 2011 at 5:29 PM, Bill Hoffman 
wrote:
> > > On 11/11/2011 9:36 PM, Peter Collingbourne wrote:
> > >  Note that this generator is *nix only (it relies on POSIX shell
> > >  
> > >> functionality), and will only be built on *nix platforms.  I am not
> > >> interested in Windows support, but I understand that others have
> > >> expressed an interest in adding support.
> > >> 
> > >>  How much of the POSIX shell stuff can be done with cmake -E stuff? 
> > >>  It
> > > 
> > > would be good to use as little POSIX stuff as possible as someday when
> > > someone does the inevitable windows port it is easier...
> > 
> > Too much in my opinion. Specially the && operator of the shell. Using
> > cmake -E is the first step. I am planning to suggest an evolution of
> > Ninja to fix this issue. Actually, it is the main issue which stop me
> > while writing the beginning of this generator.
> 
> Other than && we also have:
> 
> rm -f $file -- used to delete static library archives before rebuilding

cmake -E remove -f $file
 
> :   -- used as a no-op command

maybe
cmake -E echo

Alex
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


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

2011-11-22 Thread Peter Collingbourne
On Tue, Nov 15, 2011 at 06:54:01PM +0100, Nicolas Desprès wrote:
> On Tue, Nov 15, 2011 at 5:29 PM, Bill Hoffman wrote:
> 
> > On 11/11/2011 9:36 PM, Peter Collingbourne wrote:
> >
> >  Note that this generator is *nix only (it relies on POSIX shell
> >> functionality), and will only be built on *nix platforms.  I am not
> >> interested in Windows support, but I understand that others have
> >> expressed an interest in adding support.
> >>
> >>  How much of the POSIX shell stuff can be done with cmake -E stuff?  It
> > would be good to use as little POSIX stuff as possible as someday when
> > someone does the inevitable windows port it is easier...
> >
> >
> Too much in my opinion. Specially the && operator of the shell. Using cmake
> -E is the first step. I am planning to suggest an evolution of Ninja to fix
> this issue. Actually, it is the main issue which stop me while writing the
> beginning of this generator.

Other than && we also have:

rm -f $file -- used to delete static library archives before rebuilding
:   -- used as a no-op command

I think that for the Windows port we can simply select the appropriate
command (e.g. rm vs del) since we know which platform we are building
for.

Thanks,
-- 
Peter
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


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

2011-11-22 Thread Peter Collingbourne
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  wrote:
> 
> > (Sorry Bill, i repost here..)
> >
> > 2011/11/16 Bill Hoffman :
> > - 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
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


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

2011-11-18 Thread Nicolas Desprès
On Wed, Nov 16, 2011 at 6:06 PM, Bill Hoffman wrote:

> On 11/16/2011 9:05 AM, OKUMURA Yuki wrote:
>
>> (Sorry Bill, i repost here..)
>>
>> 2011/11/16 Bill Hoffman
>> >:
>> - 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/**db19df03606684f313c9e86b313218
>> **feee9cce3f
>> but it didn't work well.
>>
>> 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.
>>
>> -- oku
>>
>>  Are there some examples of what people are doing with ninja on windows
> for other projects?
>

Nothing I know except Ninja itself. I will try to give it a try to CMake
itself this weekend.

Cheers,

-- 
Nicolas Desprès
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

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

2011-11-18 Thread Nicolas Desprès
On Wed, Nov 16, 2011 at 3:05 PM, OKUMURA Yuki  wrote:

> (Sorry Bill, i repost here..)
>
> 2011/11/16 Bill Hoffman :
> - 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.
>
> 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.

Cheers,

-- 
Nicolas Desprès
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

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

2011-11-18 Thread Nicolas Desprès
2011/11/15 Bill Hoffman 

> On 11/15/2011 1:11 PM, Nicolas Desprès wrote:
>
>>
>>
>> 2011/11/15 Bill Hoffman > >
>>
>>
>>On 11/15/2011 12:54 PM, Nicolas Desprès wrote:
>>
>>Too much in my opinion. Specially the && operator of the shell.
>>Using
>>cmake -E is the first step. I am planning to suggest an evolution
>> of
>>Ninja to fix this issue. Actually, it is the main issue which
>>stop me
>>while writing the beginning of this generator.
>>Cheers,
>>
>>
>>What type of evolution will Ninja need?   I suppose it could use
>>cmake scripts and exectue_process which can do && type things pretty
>>easy.
>>
>>
>> Writting cmake script is one solution but since (at least when I started
>> the Ninja Generator) Ninja uses $in as input file for the build
>> statement it can be hard to pass to the cmake script.  I had a
>> discussion on this email some month ago about how to pass argument to
>> the cmake script. Maybe it will work using -D option. Not sure about
>> that. It is old in my mind and I have to check this out again.
>>
>
> -D will work, but is a bit ugly.  I see the ninja build files do not have
> a rule per file, but rather have production rules most of the time?


Actually you have rule statement like this one for instance:

# Rule for compiling CXX files.
rule CXX_COMPILER
  depfile = $out.d
  command = /usr/bin/c++   $DEFINES -MMD -MF $out.d $FLAGS -o $out -c $in
  description = Building CXX object $out

Where you can describe only one command and not a list of command. And you
have build statement where you mention outputs, inputs the rule to deals
with them and overload some variables. For example:

build Source/kwsys/CMakeFiles/cmsys.dir/SystemTools.cxx.o: CXX_COMPILER
../Source/kwsys/SystemTools.cxx
  DEFINES = -DKWSYS_NAMESPACE=cmsys
  FLAGS = -g -ISource -ISource/kwsys


>
>
>> In a general manner I wanted to prevent Ninja to spawn a shell which in
>> turn parse the command since it is not that portable on Windows and thus
>> to provide an alternative syntax to just spawn a process. Something
>> closer to "execute_process" than "system" to say it shortly.
>>
>>
> OK, so ninja does not have a native execute_process.  How is anyone doing
> anything with ninja on windows  right now?
>

Sorry for the delayed answer.  I wanted to take the time to have a look at
Ninja's source code to give the right answer. So actually, there is two
implementations of the Subprocess class. The one for Linux spawn a /bin/sh
whereas the one for Windows uses CreateProcessA():

  // Do not prepend 'cmd /c' on Windows, this breaks command
  // lines greater than 8,191 chars.
  if (!CreateProcessA(NULL, (char*)command.c_str(), NULL, NULL,
  /* inherit handles */ TRUE, 0,
  NULL, NULL,
  &startup_info, &process_info)) {
Win32Fatal("CreateProcess");
  }

So actually contrary to what I said before the Windows implementation is
quite good.

Finally, the only thing missing would be the ability to call several
commands if a cmake script is not enough.

Cheers,

-- 
Nicolas Desprès
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

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

2011-11-16 Thread Bill Hoffman

On 11/16/2011 9:05 AM, OKUMURA Yuki wrote:

(Sorry Bill, i repost here..)

2011/11/16 Bill Hoffman:
- 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.

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.

-- oku

Are there some examples of what people are doing with ninja on windows 
for other projects?


-Bill
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


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

2011-11-16 Thread OKUMURA Yuki
(Sorry Bill, i repost here..)

2011/11/16 Bill Hoffman :
- 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.

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.

-- oku
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


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

2011-11-15 Thread Bill Hoffman

On 11/15/2011 1:11 PM, Nicolas Desprès wrote:



2011/11/15 Bill Hoffman mailto:bill.hoff...@kitware.com>>

On 11/15/2011 12:54 PM, Nicolas Desprès wrote:

Too much in my opinion. Specially the && operator of the shell.
Using
cmake -E is the first step. I am planning to suggest an evolution of
Ninja to fix this issue. Actually, it is the main issue which
stop me
while writing the beginning of this generator.
Cheers,


What type of evolution will Ninja need?   I suppose it could use
cmake scripts and exectue_process which can do && type things pretty
easy.


Writting cmake script is one solution but since (at least when I started
the Ninja Generator) Ninja uses $in as input file for the build
statement it can be hard to pass to the cmake script.  I had a
discussion on this email some month ago about how to pass argument to
the cmake script. Maybe it will work using -D option. Not sure about
that. It is old in my mind and I have to check this out again.


-D will work, but is a bit ugly.  I see the ninja build files do not 
have a rule per file, but rather have production rules most of the time?




In a general manner I wanted to prevent Ninja to spawn a shell which in
turn parse the command since it is not that portable on Windows and thus
to provide an alternative syntax to just spawn a process. Something
closer to "execute_process" than "system" to say it shortly.



OK, so ninja does not have a native execute_process.  How is anyone 
doing anything with ninja on windows  right now?


-Bill


--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


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

2011-11-15 Thread Nicolas Desprès
2011/11/15 Bill Hoffman 

> On 11/15/2011 12:54 PM, Nicolas Desprès wrote:
>
>  Too much in my opinion. Specially the && operator of the shell. Using
>> cmake -E is the first step. I am planning to suggest an evolution of
>> Ninja to fix this issue. Actually, it is the main issue which stop me
>> while writing the beginning of this generator.
>> Cheers,
>>
>>
> What type of evolution will Ninja need?   I suppose it could use cmake
> scripts and exectue_process which can do && type things pretty easy.
>

Writting cmake script is one solution but since (at least when I started
the Ninja Generator) Ninja uses $in as input file for the build statement
it can be hard to pass to the cmake script.  I had a discussion on this
email some month ago about how to pass argument to the cmake script. Maybe
it will work using -D option. Not sure about that. It is old in my mind and
I have to check this out again.

In a general manner I wanted to prevent Ninja to spawn a shell which in
turn parse the command since it is not that portable on Windows and thus to
provide an alternative syntax to just spawn a process. Something closer to
"execute_process" than "system" to say it shortly.

-- 
Nicolas Desprès
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

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

2011-11-15 Thread Bill Hoffman

On 11/15/2011 12:54 PM, Nicolas Desprès wrote:


Too much in my opinion. Specially the && operator of the shell. Using
cmake -E is the first step. I am planning to suggest an evolution of
Ninja to fix this issue. Actually, it is the main issue which stop me
while writing the beginning of this generator.
Cheers,



What type of evolution will Ninja need?   I suppose it could use cmake 
scripts and exectue_process which can do && type things pretty easy.


-Bill

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


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

2011-11-15 Thread Nicolas Desprès
On Tue, Nov 15, 2011 at 5:29 PM, Bill Hoffman wrote:

> On 11/11/2011 9:36 PM, Peter Collingbourne wrote:
>
>  Note that this generator is *nix only (it relies on POSIX shell
>> functionality), and will only be built on *nix platforms.  I am not
>> interested in Windows support, but I understand that others have
>> expressed an interest in adding support.
>>
>>  How much of the POSIX shell stuff can be done with cmake -E stuff?  It
> would be good to use as little POSIX stuff as possible as someday when
> someone does the inevitable windows port it is easier...
>
>
Too much in my opinion. Specially the && operator of the shell. Using cmake
-E is the first step. I am planning to suggest an evolution of Ninja to fix
this issue. Actually, it is the main issue which stop me while writing the
beginning of this generator.

Cheers,

-- 
Nicolas Desprès
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

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

2011-11-15 Thread Bill Hoffman

On 11/11/2011 9:36 PM, Peter Collingbourne wrote:


Note that this generator is *nix only (it relies on POSIX shell
functionality), and will only be built on *nix platforms.  I am not
interested in Windows support, but I understand that others have
expressed an interest in adding support.

How much of the POSIX shell stuff can be done with cmake -E stuff?  It 
would be good to use as little POSIX stuff as possible as someday when 
someone does the inevitable windows port it is easier...


-Bill

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


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

2011-11-12 Thread Alexander Neundorf
On Saturday 12 November 2011, Peter Collingbourne wrote:
> Hi,
...
> -- 
> Peter
> 
> [1] The disproportionately large Ninja run time here seems to be
> caused by a large number of required invocations of the 'automoc'
> command.

I plan to optimize this by only checking those files again which have actually 
changed since the last time.

Alex

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


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

2011-11-11 Thread Peter Collingbourne
Hi,

These patches add the Ninja generator to CMake, which I am now
proposing for inclusion in mainline.  The generator should work
with the current 'master' branch of Ninja from:

https://github.com/martine/ninja

The generator passes the CMake test suite on Linux (Debian testing)
and FreeBSD 9.0-RC1, and I have been regularly using it myself with
LLVM and Clang for about 2 months.  I have also successfully tested it
with the build systems for OpenCV, Bullet Physics, BRL-CAD, kdelibs
and Path64.

Some performance numbers for no-op builds (2.0GHz dual core laptop,
Debian testing):

CMake:
Unix Makefiles: 0.6s
Ninja:  0.042s

kdelibs:
Unix Makefiles: 9.8s
Ninja:  2.5s [1]

LLVM/Clang/Polly:
Unix Makefiles: 2.9s
Ninja:  0.18s

BRL-CAD:
Unix Makefiles: 19s
Ninja:  0.40s

Path64:
Unix Makefiles: 3.9s
Ninja:  0.25s

Note that this generator is *nix only (it relies on POSIX shell
functionality), and will only be built on *nix platforms.  I am not
interested in Windows support, but I understand that others have
expressed an interest in adding support.

I made some minor changes to the ExternalProject module as well as
some of the tests to make them work with the generator, and added
explanations for those changes as comments.

I separated out the changes to kwsys, so that they can be applied
separately.

This patch series is also available from my git repository:
git://github.com/pcc/CMake.git ninja-generator-pr

Please review!

Thanks,
-- 
Peter

[1] The disproportionately large Ninja run time here seems to be
caused by a large number of required invocations of the 'automoc'
command.

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers