File tree Expand file tree Collapse file tree 5 files changed +13
-19
lines changed Expand file tree Collapse file tree 5 files changed +13
-19
lines changed Original file line number Diff line number Diff line change 44include (GNUInstallDirs)
55include (ExternalProject)
66
7+ if (NOT DEFINED hdf5_key)
8+ set (hdf5_key hdf5-1.10)
9+ endif ()
10+
711if (hdf5_parallel)
812 find_package (MPI REQUIRED COMPONENTS C)
913endif ()
@@ -74,7 +78,7 @@ if(MPI_ROOT)
7478endif ()
7579
7680if (NOT hdf5_url)
77- string (JSON hdf5_url GET ${json} hdf5 url )
81+ string (JSON hdf5_url GET ${json} ${hdf5_key} )
7882endif ()
7983
8084# Get HDF5 version from underscore-separated version in URL
Original file line number Diff line number Diff line change 11{
2- "zlib1" : {
3- "url" : " https://zlib.net/zlib-1.3.1.tar.gz"
4- },
5- "zlib2" : {
6- "url" : " https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.2.3.tar.gz"
7- },
8- "hdf5" : {
9- "url" : " https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5-1_10_11.tar.gz"
10- }
2+ "zlib1" : " https://zlib.net/zlib-1.3.1.tar.gz" ,
3+ "zlib2" : " https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.2.3.tar.gz" ,
4+ "hdf5-1.10" : " https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5-1_10_11.tar.gz" ,
5+ "hdf5-1.14" : " https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5_1.14.5.tar.gz"
116}
Original file line number Diff line number Diff line change @@ -4,11 +4,7 @@ include(GNUInstallDirs)
44include (ExternalProject)
55
66if (NOT zlib_url)
7- if (zlib_legacy)
8- string (JSON zlib_url GET ${json} zlib1 url)
9- else ()
10- string (JSON zlib_url GET ${json} zlib2 url)
11- endif ()
7+ string (JSON zlib_url GET ${json} ${zlib_key} )
128endif ()
139
1410set (ZLIB_INCLUDE_DIRS ${CMAKE_INSTALL_FULL_INCLUDEDIR} )
@@ -20,7 +16,7 @@ if(BUILD_SHARED_LIBS)
2016 set (ZLIB_LIBRARIES ${CMAKE_INSTALL_FULL_LIBDIR} /${CMAKE_SHARED_LIBRARY_PREFIX} z${CMAKE_SHARED_LIBRARY_SUFFIX} )
2117 endif ()
2218else ()
23- if (MSVC OR (WIN32 AND zlib_legacy ))
19+ if (MSVC OR (WIN32 AND zlib_key STREQUAL "zlib1" ))
2420 set (ZLIB_LIBRARIES ${CMAKE_INSTALL_FULL_LIBDIR} /${CMAKE_STATIC_LIBRARY_PREFIX} zlibstatic${CMAKE_STATIC_LIBRARY_SUFFIX} )
2521 else ()
2622 set (ZLIB_LIBRARIES ${CMAKE_INSTALL_FULL_LIBDIR} /${CMAKE_STATIC_LIBRARY_PREFIX} z${CMAKE_STATIC_LIBRARY_SUFFIX} )
Original file line number Diff line number Diff line change @@ -125,10 +125,10 @@ This is necessary to workaround techniques used by HDF5 CMake files that don't p
125125Otherwise, HDF5 build failures may result due to defaulting to icl-clang.
126126
127127By default we use Zlib 2.x a.k.a. zlib-ng.
128- If you have a problem with Zlib-ng on your system, try the unmaintained Zlib 1.x by:
128+ If you have a problem with Zlib-ng on your system, try Zlib 1.x by:
129129
130130``` sh
131- cmake -B build -Dzlib_legacy=on
131+ cmake -B build -Dzlib_key=zlib1
132132```
133133
134134## Usage
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ LANGUAGES C Fortran
66)
77
88option (hdf5_parallel "build HDF5 parallel MPI" )
9- option (zlib_legacy "use legacy zlib 1.x" )
109option (build_zlib "build zlib" )
1110
1211# --- system checks
You can’t perform that action at this time.
0 commit comments