summaryrefslogtreecommitdiffstats
path: root/config/cmake_ext_mod
diff options
context:
space:
mode:
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)