[CMake] [CMAKE] It is is necessary to make heavy regex operations in FindZLIB.cmake?

Michael Wild themiwi at gmail.com
Mon Oct 18 08:10:56 EDT 2010


On 18. Oct, 2010, at 11:57 , Chaos A.D. wrote:

> Recently I updated to kubuntu 10.10, which ships new cmake 2.8.2 to me. Then
> I noticed that KDevelop (IDE for C++) hangs when opening projects, since it
> heavily dependent on cmake execution.
> Then I inspected the process of configuring project with cmake using
> --trace, and noticed, that multiple calls to STRING(REGEX ...) slows down
> configure time from several seconds to almost 30 secs.
> I fixed this issue by reverting FindZLIB.cmake from 2.8.
> 
> It is possible to replace this heavy
> STRING(REGEX REPLACE ".*#define ZLIB_VERSION
> \"([0-9]+)\\.([0-9]+)\\.([0-9]+)\".*" "\\1.\\2.\\3" ZLIB_VERSION_STRING
> "${ZLIB_H}")
> with something more light-weight in cmake-2.8/Modules/FindZLIB.cmake?

This is already fixed in the git repository and should be in version 2.8.3.

Michael

--
There is always a well-known solution to every human problem -- neat, plausible, and wrong.
H. L. Mencken

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101018/36f5c20c/attachment.pgp>


More information about the CMake mailing list