diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2023-10-04 20:51:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-04 20:51:01 (GMT) |
commit | 283202bc6268843a4a4c26e2c39020791e9af929 (patch) | |
tree | 775e2b132f3402656a3a06bf1eeb8a08373ce2a2 /CMakeFilters.cmake | |
parent | b1663686012d7c1cc10ef0792bf478442f2c0e7f (diff) | |
download | hdf5-283202bc6268843a4a4c26e2c39020791e9af929.zip hdf5-283202bc6268843a4a4c26e2c39020791e9af929.tar.gz hdf5-283202bc6268843a4a4c26e2c39020791e9af929.tar.bz2 |
Remove old EXTERNALPROJECT_ADD in favor of FETCH_CONTENT (#3624)
Diffstat (limited to 'CMakeFilters.cmake')
-rw-r--r-- | CMakeFilters.cmake | 59 |
1 files changed, 18 insertions, 41 deletions
diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index 78f98db..53cf539 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake @@ -13,30 +13,24 @@ option (USE_LIBAEC_STATIC "Use static AEC library " OFF) option (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 0) option (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 0) -option (BUILD_ZLIB_WITH_FETCHCONTENT "Use FetchContent to use original source files" OFF) -if (BUILD_ZLIB_WITH_FETCHCONTENT) - set (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 1) - if (NOT ZLIB_USE_LOCALCONTENT) - set (ZLIB_URL ${ZLIB_TGZ_ORIGPATH}/${ZLIB_TGZ_ORIGNAME}) - else () - set (ZLIB_URL ${TGZPATH}/${ZLIB_TGZ_ORIGNAME}) - endif () - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (VERBOSE "Filter ZLIB file is ${ZLIB_URL}") - endif () +set (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 1) +if (NOT ZLIB_USE_LOCALCONTENT) + set (ZLIB_URL ${ZLIB_TGZ_ORIGPATH}/${ZLIB_TGZ_ORIGNAME}) +else () + set (ZLIB_URL ${TGZPATH}/${ZLIB_TGZ_ORIGNAME}) +endif () +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Filter ZLIB file is ${ZLIB_URL}") endif () -option (BUILD_SZIP_WITH_FETCHCONTENT "Use FetchContent to use original source files" OFF) -if (BUILD_SZIP_WITH_FETCHCONTENT) - set (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 1) - if (NOT LIBAEC_USE_LOCALCONTENT) - set (SZIP_URL ${LIBAEC_TGZ_ORIGPATH}/${LIBAEC_TGZ_ORIGNAME}) - else () - set (SZIP_URL ${TGZPATH}/${LIBAEC_TGZ_ORIGNAME}) - endif () - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (VERBOSE "Filter SZIP file is ${SZIP_URL}") - endif () +set (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 1) +if (NOT LIBAEC_USE_LOCALCONTENT) + set (SZIP_URL ${LIBAEC_TGZ_ORIGPATH}/${LIBAEC_TGZ_ORIGNAME}) +else () + set (SZIP_URL ${TGZPATH}/${LIBAEC_TGZ_ORIGNAME}) +endif () +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Filter SZIP file is ${SZIP_URL}") endif () include (ExternalProject) @@ -55,18 +49,12 @@ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MAT if (NOT TGZPATH) set (TGZPATH ${HDF5_SOURCE_DIR}) endif () - if (NOT BUILD_ZLIB_WITH_FETCHCONTENT) - set (ZLIB_URL ${TGZPATH}/${ZLIB_TGZ_NAME}) - endif () if (ZLIB_USE_LOCALCONTENT) if (NOT EXISTS "${ZLIB_URL}") set (HDF5_ENABLE_Z_LIB_SUPPORT OFF CACHE BOOL "" FORCE) message (VERBOSE "Filter ZLIB file ${ZLIB_URL} not found") endif () endif () - if (NOT BUILD_SZIP_WITH_FETCHCONTENT) - set (SZIP_URL ${TGZPATH}/${SZAEC_TGZ_NAME}) - endif () if (LIBAEC_USE_LOCALCONTENT) if (NOT EXISTS "${SZIP_URL}") set (HDF5_ENABLE_SZIP_SUPPORT OFF CACHE BOOL "" FORCE) @@ -97,12 +85,7 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT) set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${ZLIB_LIBRARIES}) endif () else () - if (BUILD_ZLIB_WITH_FETCHCONTENT) - # Only tgz files available - ORIGINAL_ZLIB_LIBRARY ("TGZ") - message (VERBOSE "HDF5_ZLIB is built from fetch content") - set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${ZLIB_STATIC_LIBRARY}) - elseif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") EXTERNAL_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT}) message (VERBOSE "Filter HDF5_ZLIB is built") set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${ZLIB_STATIC_LIBRARY}) @@ -153,13 +136,7 @@ if (HDF5_ENABLE_SZIP_SUPPORT) set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_LIBRARIES}) endif () else () - if (BUILD_SZIP_WITH_FETCHCONTENT) - # Only tgz files available - ORIGINAL_SZIP_LIBRARY ("TGZ" ${HDF5_ENABLE_SZIP_ENCODING}) - message (VERBOSE "SZIP is built from fetch content") - message (VERBOSE "... with library AEC") - set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_STATIC_LIBRARY}) - elseif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${HDF5_ENABLE_SZIP_ENCODING}) message (VERBOSE "Filter SZIP is built") message (VERBOSE "... with library AEC") |