summaryrefslogtreecommitdiffstats
path: root/config/cmake_ext_mod
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-09-28 15:55:19 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-09-28 15:55:19 (GMT)
commit8ee8b7abb55bc8d901e31b3eef9ba35abb352814 (patch)
treeadd2bf906dec7285d26dbe2e2107ec07d2f685da /config/cmake_ext_mod
parentaa08db839e6aea89487be985704d57a0e424b21b (diff)
parent088014bef4216eede409d103876a9fd3efadd358 (diff)
downloadhdf5-8ee8b7abb55bc8d901e31b3eef9ba35abb352814.zip
hdf5-8ee8b7abb55bc8d901e31b3eef9ba35abb352814.tar.gz
hdf5-8ee8b7abb55bc8d901e31b3eef9ba35abb352814.tar.bz2
Merge pull request #2902 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '088014bef4216eede409d103876a9fd3efadd358': More info for building plugins with library Remove setting from cacheinit file OESS-98 add release note for option OESS-98 merge with clang-format changes
Diffstat (limited to 'config/cmake_ext_mod')
-rw-r--r--config/cmake_ext_mod/HDFLibMacros.cmake15
-rw-r--r--config/cmake_ext_mod/HDFMacros.cmake13
2 files changed, 27 insertions, 1 deletions
diff --git a/config/cmake_ext_mod/HDFLibMacros.cmake b/config/cmake_ext_mod/HDFLibMacros.cmake
index fe633bf..9704fbd 100644
--- a/config/cmake_ext_mod/HDFLibMacros.cmake
+++ b/config/cmake_ext_mod/HDFLibMacros.cmake
@@ -84,6 +84,10 @@ endmacro ()
#-------------------------------------------------------------------------------
macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
if (${compress_type} MATCHES "GIT")
+# FetchContent_Declare (SZIP
+# GIT_REPOSITORY ${SZIP_URL}
+# GIT_TAG ${SZIP_BRANCH}
+# )
EXTERNALPROJECT_ADD (SZIP
GIT_REPOSITORY ${SZIP_URL}
GIT_TAG ${SZIP_BRANCH}
@@ -104,6 +108,10 @@ macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
-DPACKAGE_NAMESPACE=${HDF_PACKAGE_NAMESPACE}
)
elseif (${compress_type} MATCHES "TGZ")
+# FetchContent_Declare (SZIP
+# URL ${SZIP_URL}
+# URL_HASH ""
+# )
EXTERNALPROJECT_ADD (SZIP
URL ${SZIP_URL}
URL_MD5 ""
@@ -125,7 +133,12 @@ macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
)
endif ()
externalproject_get_property (SZIP BINARY_DIR SOURCE_DIR)
-
+# FetchContent_GetProperties(SZIP)
+# if(NOT SZIP_POPULATED)
+# FetchContent_Populate(SZIP)
+# add_subdirectory(${szip_SOURCE_DIR} ${szip_BINARY_DIR})
+# endif()
+#
##include (${BINARY_DIR}/${SZ_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake)
# Create imported target szip-static
if (USE_LIBAEC)
diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake
index 5740740..eb0392e 100644
--- a/config/cmake_ext_mod/HDFMacros.cmake
+++ b/config/cmake_ext_mod/HDFMacros.cmake
@@ -427,6 +427,19 @@ macro (HDF_DIR_PATHS package_prefix)
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
endif ()
endif ()
+
+#-----------------------------------------------------------------------------
+# Setup pre-3.14 FetchContent
+#-----------------------------------------------------------------------------
+ if(${CMAKE_VERSION} VERSION_LESS 3.14)
+ macro(FetchContent_MakeAvailable NAME)
+ FetchContent_GetProperties(${NAME})
+ if(NOT ${NAME}_POPULATED)
+ FetchContent_Populate(${NAME})
+ add_subdirectory(${${NAME}_SOURCE_DIR} ${${NAME}_BINARY_DIR})
+ endif()
+ endmacro()
+ endif()
endmacro ()
macro (ADD_H5_FLAGS h5_flag_var infile)