[cmake-developers] CMake is slow for project with hundred target and one command with large number of dependencies

Stephen Kelly steveire at gmail.com
Mon Jul 29 08:09:49 EDT 2013


Nicolas Desprès wrote:

> On Mon, Jul 29, 2013 at 12:57 PM, Stephen Kelly
> <steveire at gmail.com> wrote:
> 
>> Nicolas Desprès wrote:
>> > It was fastest because it was not doing the right thing. I tried to
>> > patch it properly and the benchmark are the same whether we use the
>> > default comparison functor or mine.
>> >
>> > So I think you can merge it like that. I have pushed a new version
>> without
>> > the comment.
>> >
>>
>> I still haven't tried it, but there are still style issues.
> 
> 
>> * Don't put an else after a return
>> * Wrap single line blocks in {}
>>
> 
> Fixed and force-pushed. Sorry for the inconvenience. I am not used to this
> style yet.

Your Compare::operator() contains this:
 
 if (j == s2.rend())
   {
   return false;
   }
 return false;

Any reason not to simplify that?

Also, I don't see why the custom comparison functor is needed at all. I 
removed it and sped up the test significantly. Can you explain?

Thanks,

Steve.





More information about the cmake-developers mailing list