Skip to content

Commit e8e2aeb

Browse files
committed
CMake: Warn and Continue on Empty HDF5_VERSION
Seen on Conda-Forge for arm64 on macOS for HDF5 1.14.1
1 parent 569c52c commit e8e2aeb

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

CHANGELOG.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Bug Fixes
2626
- Python:
2727

2828
- DataFrame to ASCII: Header of First Column in CSV bug documentation third party #1480 #1501
29-
- Update __repr__ method of major objects in openPMD hierarchy #1476
29+
- Update ``__repr__`` method of major objects in openPMD hierarchy #1476
3030
- openpmd-pipe: set correct install permissions #1459
3131
- Better error message when loading to a buffer with mismatched type #1452
3232
- Use lazy imports for dask and pandas #1442
@@ -41,6 +41,7 @@ Bug Fixes
4141
- Handle unknown datatypes in datasets #1469
4242
- Support for float128 on ARM64/PPC64 #1364
4343
- Fix Char Type Matching #1433 #1431
44+
- Install: Warn and Continue on Empty ``HDF5_VERSION`` in CMake #1512
4445
- CI:
4546

4647
- type comparison in openpmd-pipe #1490
@@ -49,7 +50,7 @@ Other
4950
"""""
5051

5152
- Better handling for file extensions #1473 #1471
52-
- Optional debugging output for AbstractIOHandlerImpl::flush() #1495
53+
- Optional debugging output for ``AbstractIOHandlerImpl::flush()`` #1495
5354
- Python: 3.8+ #1502
5455
- CI:
5556

@@ -61,12 +62,12 @@ Other
6162
- Analysis with third party data science frameworks #1444
6263
- Sphinx Copybutton and Design #1461
6364
- Fix small documentation issues after 0.15 release #1440
64-
- HDF5_DO_MPI_FILE_SYNC #1427
65+
- ``HDF5_DO_MPI_FILE_SYNC`` #1427
6566
- OpenMPI-ROMIO/HDF5/Chunking issue #1441
6667
- Remove ADIOS2 schema 2021 #1451
6768
- Linking to C++ Projects #1445
6869
- Fix deprecated APIs in first read/write examples #1435
69-
- Update .readthedocs.yml #1438
70+
- Update ``.readthedocs.yml`` #1438
7071
- Fix Bib Authors #1434
7172
- More careful documentation of streaming API #1430
7273

CMakeLists.txt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,16 @@ endif()
334334
# HDF5 checks
335335
string(CONCAT openPMD_HDF5_STATUS "")
336336
# version: lower limit
337-
if(openPMD_HAVE_HDF5 AND HDF5_VERSION VERSION_LESS 1.8.13)
338-
string(CONCAT openPMD_HDF5_STATUS
339-
"Found HDF5 version ${HDF5_VERSION} is too old. At least "
340-
"version 1.8.13 is required.\n")
337+
if(openPMD_HAVE_HDF5)
338+
if(HDF5_VERSION STREQUAL "")
339+
message(WARNING "HDF5_VERSION is empty. Now assuming it is 1.8.13 or newer.")
340+
else()
341+
if(HDF5_VERSION VERSION_LESS 1.8.13)
342+
string(CONCAT openPMD_HDF5_STATUS
343+
"Found HDF5 version ${HDF5_VERSION} is too old. At least "
344+
"version 1.8.13 is required.\n")
345+
endif()
346+
endif()
341347
endif()
342348
# we imply support for parallel I/O if MPI variant is ON
343349
if(openPMD_HAVE_MPI AND openPMD_HAVE_HDF5

0 commit comments

Comments
 (0)