Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/cmake/Helpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,12 @@ macro(av_add_cmake_dep)
if(_D_GIT_TAG)
list(APPEND _D_SRC_ARGS GIT_TAG ${_D_GIT_TAG})
endif()
# Shallow clone : plus rapide, économise le réseau
list(APPEND _D_SRC_ARGS GIT_SHALLOW TRUE)
# Shallow clone only fetches the default-branch tip: a GIT_TAG that is
# a commit hash not at that tip fails to check out. Use it only for
# named refs (branches/tags), not for pinned commits.
if(NOT "${_D_GIT_TAG}" MATCHES "^[0-9a-fA-F]+$")
list(APPEND _D_SRC_ARGS GIT_SHALLOW TRUE)
endif()
endif()

ExternalProject_Add(${_D_TARGET}
Expand Down
Loading