Commits (4)
......@@ -2,6 +2,10 @@ if (CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS "3.12")
cmake_minimum_required(VERSION 3.12)
endif ()
if (POLICY CMP0114)
cmake_policy(SET CMP0114 NEW)
endif ()
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
message(FATAL_ERROR
"This project is not meant to be run directly, but instead used via "
......
......@@ -37,12 +37,27 @@ string(REPLACE ")" "|PROCESS_ENVIRONMENT)"
add_custom_target(download-all)
set(old_policy_114 1)
if (POLICY CMP0114)
cmake_policy(GET CMP0114 cmp0114_state)
if (cmp0114_state STREQUAL "NEW")
set(old_policy_114 0)
endif ()
endif ()
set(_superbuild_independent_step_targets
download
update)
set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
PROPERTY
EP_INDEPENDENT_STEP_TARGETS "${_superbuild_independent_step_targets}")
update
patch)
if (old_policy_114)
set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
PROPERTY
EP_INDEPENDENT_STEP_TARGETS "${_superbuild_independent_step_targets}")
else ()
set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
PROPERTY
EP_STEP_TARGETS "${_superbuild_independent_step_targets}")
endif ()
option(SUPERBUILD_OFFLINE_BUILD "Do not update git repositories during the build" OFF)
if (SUPERBUILD_OFFLINE_BUILD)
......
......@@ -509,6 +509,12 @@ function (superbuild_apply_patch _name _patch _comment)
PROPERTY
"${current_project}_patch_steps")
set(_independent)
if (NOT CMAKE_VERSION VERSION_LESS "3.19")
list(APPEND _independent
INDEPENDENT 1)
endif ()
superbuild_project_add_step("${_name}-patch-${_patch}"
COMMAND "${GIT_EXECUTABLE}"
apply
......@@ -518,13 +524,13 @@ function (superbuild_apply_patch _name _patch _comment)
"${CMAKE_CURRENT_LIST_DIR}/patches/${_name}-${_patch}.patch"
DEPENDEES patch ${patch-steps}
DEPENDERS configure
${_independent}
COMMENT "${_comment}"
WORKING_DIRECTORY <SOURCE_DIR>)
set_property(GLOBAL APPEND
PROPERTY
"${current_project}_patch_steps" "${_name}-patch-${_patch}")
endfunction ()
#[==[.md
......
......@@ -9,9 +9,7 @@ superbuild_add_project(hdf5
-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=TRUE
-DHDF5_ENABLE_SZIP_ENCODING:BOOL=TRUE
-DHDF5_BUILD_HL_LIB:BOOL=TRUE
-DHDF5_BUILD_WITH_INSTALL_NAME:BOOL=ON
-DH5_USE_110_API:BOOL=ON
-DDEFAULT_API_VERSION:STRING=v110)
-DHDF5_BUILD_WITH_INSTALL_NAME:BOOL=ON)
superbuild_add_extra_cmake_args(
-DHDF5_ROOT:PATH=<INSTALL_DIR>
......