mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-15 20:46:37 +08:00
FindHDF5: Fix detection of versions with more than three components
Fix detecting the version of HDF5 1.14.4.2. Fixes: #25945
This commit is contained in:

committed by
Brad King

parent
2ee4ac0210
commit
928943f91b
@@ -987,7 +987,7 @@ if( NOT HDF5_FOUND )
|
|||||||
HDF5_VERSION_DEFINE
|
HDF5_VERSION_DEFINE
|
||||||
REGEX "^[ \t]*#[ \t]*define[ \t]+H5_VERSION[ \t]+" )
|
REGEX "^[ \t]*#[ \t]*define[ \t]+H5_VERSION[ \t]+" )
|
||||||
if( "${HDF5_VERSION_DEFINE}" MATCHES
|
if( "${HDF5_VERSION_DEFINE}" MATCHES
|
||||||
"H5_VERSION[ \t]+\"([0-9]+\\.[0-9]+\\.[0-9]+)(-patch([0-9]+))?\"" )
|
"H5_VERSION[ \t]+\"([0-9\\.]+)(-patch([0-9]+))?\"" )
|
||||||
set( HDF5_VERSION "${CMAKE_MATCH_1}" )
|
set( HDF5_VERSION "${CMAKE_MATCH_1}" )
|
||||||
if( CMAKE_MATCH_3 )
|
if( CMAKE_MATCH_3 )
|
||||||
set( HDF5_VERSION ${HDF5_VERSION}.${CMAKE_MATCH_3})
|
set( HDF5_VERSION ${HDF5_VERSION}.${CMAKE_MATCH_3})
|
||||||
|
Reference in New Issue
Block a user