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

Stephen Kelly steveire at gmail.com
Tue Jul 23 11:59:11 EDT 2013


Nicolas Desprès wrote:

> Hi Stephen,
> 
> Did you have any chance to look at the code? I would love to see it
> integrated in the next release. That being said, there is no pressure.
> 

I'll have a look now.


 +    UpdateOutputToSourceMap(outputs, file);

is missing a 'this->', as per the style. There's a couple of repeats of 
that.

Please rename 

 typedef std::map<std::string, cmSourceFile*> OutputToInputMap;

to OutputToSourceMap for similarity to the OutputToSource variable.

I haven't tried it out yet, but it looks sane to me. The 
UpdateOutputToSourceMap could probably be faster if outputs is sorted and 
you use lower-bound insertion in a loop over the map or so. If it's fast 
enough already though, probably no need for that :).

I'd say the topic can be cleaned up and force pushed for another review.

Thanks,

Steve.





More information about the cmake-developers mailing list