MantisBT - CMake
View Issue Details
0011049CMakeModulespublic2010-07-27 15:522010-08-04 02:41
Droscy 
Kovarththanan Rajaratnam 
normalmajorN/A
closedfixed 
CMake-2-8 
CMake-2-8 
0011049: FindZLIB does not correctly get the version from zlib.h header file
FindZLIB does not correctly get the version string from zlib.h header file and, in addition, it is very slow in trying to get that version because the script reads the whole zlib.h file.

The attached FindZLIB.cmake file speeds up the search process and correctly gets the version string from zlib.h setting the right CMake's variable as reported in the guide line for Module Maintainers.
No tags attached.
? FindZLIB.cmake (3,764) 2010-07-27 15:52
https://public.kitware.com/Bug/file/3278/FindZLIB.cmake
Issue History
2010-07-27 15:52DroscyNew Issue
2010-07-27 15:52DroscyFile Added: FindZLIB.cmake
2010-07-31 12:18Greg SharpNote Added: 0021585
2010-08-01 00:34Kovarththanan RajaratnamNote Added: 0021586
2010-08-01 04:07DroscyNote Added: 0021587
2010-08-01 04:09Kovarththanan RajaratnamNote Added: 0021588
2010-08-02 11:56Clinton StimpsonNote Added: 0021596
2010-08-02 14:08Kovarththanan RajaratnamNote Added: 0021598
2010-08-03 12:16Kovarththanan RajaratnamStatusnew => assigned
2010-08-03 12:16Kovarththanan RajaratnamAssigned To => Kovarththanan Rajaratnam
2010-08-04 02:41Kovarththanan RajaratnamStatusassigned => closed
2010-08-04 02:41Kovarththanan RajaratnamResolutionopen => fixed
2010-08-04 02:41Kovarththanan RajaratnamFixed in Version => CMake-2-8

Notes
(0021585)
Greg Sharp   
2010-07-31 12:18   
I have confirmed correct operation of Droscy's patch on Debian x86_64.

This is a frustrating bug. Please fix soon. Thanks!
(0021586)
Kovarththanan Rajaratnam   
2010-08-01 00:34   
Greg, I've submitted the patch. Hopefully it will be picked up for the next release.
(0021587)
Droscy   
2010-08-01 04:07   
The new FindPackageHandleStandardArgs, as reported here http://public.kitware.com/Bug/view.php?id=9414, [^] will automatically do version-checking, so the lines between 67 and 79 of my edited FindZLIB probably can be removed.

Kovarththanan can you check if I'm right?
(0021588)
Kovarththanan Rajaratnam   
2010-08-01 04:09   
The fix for bug 0009414 still hasn't reached the master branch yet. I plan on changing the code when it does.
(0021596)
Clinton Stimpson   
2010-08-02 11:56   
A fix was already merged into master a month ago. Does that fix not work?
It barely missed the 2.8.2 release.

http://cmake.org/gitweb?p=cmake.git;a=commit;h=4dfa612e068fc82b444e1df53364b85c405264d9 [^]
(0021598)
Kovarththanan Rajaratnam   
2010-08-02 14:08   
Droscy's patch does some additional stuff:

1) Optimize the regex parsing
2) Extract and expose the TWEAK string
3) Enforce the specified version