summaryrefslogtreecommitdiffstats
path: root/config/cmake_ext_mod
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-10-16 16:09:02 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-10-16 16:09:02 (GMT)
commit72f5f74b67f72364b9c5b23e9d0c3ad69b1eb19b (patch)
tree8a9153cb16930982a2d56bb7f0918fb1b89e583d /config/cmake_ext_mod
parentee5662650911ef3eded80ccc6c1748e74e045353 (diff)
downloadhdf5-72f5f74b67f72364b9c5b23e9d0c3ad69b1eb19b.zip
hdf5-72f5f74b67f72364b9c5b23e9d0c3ad69b1eb19b.tar.gz
hdf5-72f5f74b67f72364b9c5b23e9d0c3ad69b1eb19b.tar.bz2
OESS-98 add CMake option to build plugins project within hdf5
Diffstat (limited to 'config/cmake_ext_mod')
-rw-r--r--config/cmake_ext_mod/HDFMacros.cmake13
1 files changed, 13 insertions, 0 deletions
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)