Commit f9112e71 authored by Michael Kuron's avatar Michael Kuron 💡

Update h5xx submodule if it was already cloned

parent 8b6decb6
Pipeline #1558 failed with stages
in 25 minutes and 27 seconds
......@@ -228,13 +228,18 @@ if (WITH_HDF5)
endif(WITH_HDF5)
# Check for the h5xx submodule
# and try to check it out if not found.
if(WITH_HDF5 AND NOT EXISTS "${CMAKE_SOURCE_DIR}/libs/h5xx/.git")
# and try to check it out if not found or update it if found.
if(WITH_HDF5 AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
# Try to find git
find_package(Git)
if(GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init -- libs/h5xx
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
if(GIT_FOUND)
if (NOT EXISTS "${CMAKE_SOURCE_DIR}/libs/h5xx/.git")
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init -- libs/h5xx
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
else()
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update -- libs/h5xx
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
endif()
endif()
endif()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment