summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorمهدي شينون (Mehdi Chinoune) <mehdi.chinoune@hotmail.com>2024-04-30 08:10:12 (GMT)
committerBrad King <brad.king@kitware.com>2024-04-30 15:22:41 (GMT)
commit928943f91b7f3e3eee23b227ebf341ed7303ec90 (patch)
tree05ab3e4d64eba9e20f4192234f8811c25fdae94e
parent2ee4ac021008d8abf68f220bd6f29c23ce75fb53 (diff)
downloadCMake-928943f91b7f3e3eee23b227ebf341ed7303ec90.zip
CMake-928943f91b7f3e3eee23b227ebf341ed7303ec90.tar.gz
CMake-928943f91b7f3e3eee23b227ebf341ed7303ec90.tar.bz2
FindHDF5: Fix detection of versions with more than three components
Fix detecting the version of HDF5 1.14.4.2. Fixes: #25945
-rw-r--r--Modules/FindHDF5.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index a44c6f9..cc6186f 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -987,7 +987,7 @@ if( NOT HDF5_FOUND )
HDF5_VERSION_DEFINE
REGEX "^[ \t]*#[ \t]*define[ \t]+H5_VERSION[ \t]+" )
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}" )
if( CMAKE_MATCH_3 )
set( HDF5_VERSION ${HDF5_VERSION}.${CMAKE_MATCH_3})