[cmake-developers] [PATCH] FindHDF5.cmake HDF5_VERSION Support
Rolf Eike Beer
eike at sf-mail.de
Fri May 8 11:52:31 EDT 2015
Huebl, Axel wrote:
> This commit adds VERSION support for HDF5 from
> the same sources as it adds the HDF5_IS_PARALLEL
> flag.
> @@ -343,6 +346,14 @@ if( NOT HDF5_FOUND )
> if( HDF5_HAVE_PARALLEL_DEFINE )
> set( HDF5_IS_PARALLEL TRUE )
> endif()
> +
> + file( STRINGS "${_dir}/H5pubconf.h"
> + HDF5_VERSION_DEFINE
> + REGEX "#define H5_VERSION" )
I suggest using "#define[ \t]+H5_VERSION[ \t]+": this works also on changed
indendation and does not accidentially match H5_VERSION_FOO.
> + if( "${HDF5_VERSION_DEFINE}" MATCHES
> + "H5_VERSION[ \t]+\"([0-9]+\\.[0-9]+\\.[0-9]+)\"" )
> + set( HDF5_VERSION "${CMAKE_MATCH_1}" )
> + endif()
please unset HDF5_VERSION_DEFINE here.
Greetings,
Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150508/062d5749/attachment.sig>
More information about the cmake-developers
mailing list