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

Chaos A.D. chaos.a.d88 at gmail.com
Mon Oct 18 05:57:59 EDT 2010


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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101018/d5cf3a1c/attachment.htm>


More information about the CMake mailing list