[cmake-developers] [PATCH v3] FindHDF5.cmake HDF5_VERSION Support
Huebl, Axel
a.huebl at hzdr.de
Sun May 17 10:34:07 EDT 2015
On 13.05.2015 16:04, Brad King wrote:
> On 05/13/2015 08:20 AM, Brad King wrote:
>> We could also consider moving the ".*" inside the match group
>> and then reporting the result in HDF5_VERSION_STRING instead
>> of HDF5_VERSION.
>
> OTOH, HDF5 upstream distributes a CMake package configuration
> file allowing one to set HDF5_DIR. In this case find_package(HDF5)
> will provide HDF5_VERSION, so we should be consistent with that.
>
> I did have to update our topic for this after nightly testing
> because Fedora packages H5pubconf.h under a different name.
> I added a commit to check for a few name variants and then
> rebased the version patch on that:
>
> FindHDF5: Check for a few H5pubconf*.h name variants
> http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4bd122ad
>
> FindHDF5: Add version support
> http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=56858178
>
> -Brad
>
Brad,
good catch with Fedora.
The patch you provided fixes problems with correct parallel detection on
that system, too - fantastic. (I just did some more research, similar
configure scripts such as netcdf4-python check the same three files [1]).
I personally also tend to the cropped "HDF5_VERSION" for consistency and
ease-of-use in environments using stable versions of HDF5 (most
distributions).
That doesn't mean we could not provide and *additional*
"HDF5_VERSION_STRING".
For sake of consistency, I am not sure how to provide a "-somestring"
extension to "HDF5_VERSION" that cmake's compare operators such as
VERSION_LESS would understand (and/or ignore). I guess that is not
possible and would introduce an inconsistency between the string
"HDF5_VERSION_STRING" and the quasi-numeric variable "HDF5_VERSION".
So probably cropping to the "patch" level of the version as we do it now
is acceptable.
Axel
[1] https://netcdf4-python.googlecode.com/svn/trunk/setup.py
--
Axel Huebl
Phone +49 351 260 3582
https://www.hzdr.de/crp
Computational Radiation Physics
Laser Particle Acceleration Division
Helmholtz-Zentrum Dresden - Rossendorf e.V.
Bautzner Landstrasse 400, 01328 Dresden
POB 510119, D-01314 Dresden
Vorstand: Prof. Dr.Dr.h.c. R. Sauerbrey
Prof. Dr.Dr.h.c. P. Joehnk
VR 1693 beim Amtsgericht Dresden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5099 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150517/50633ebd/attachment.bin>
More information about the cmake-developers
mailing list