Skip to content

Commit

Permalink
Merge branch 'unstable' into 3.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentzell committed Sep 10, 2020
2 parents c730fd7 + 4c19765 commit a2e1556
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions deps/external_dependency.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,18 @@ function(external_dependency)
set(src_dir ${bin_dir}_src)
if(NOT IS_DIRECTORY ${src_dir})
if(ARG_GIT_TAG)
set(clone_opts --branch ${ARG_GIT_TAG} -c advice.detachedHead=false)
set(clone_opts --branch ${ARG_GIT_TAG} -c advice.detachedHead=false)
endif()
if(NOT GIT_EXECUTABLE)
find_package(Git REQUIRED)
endif()
execute_process(COMMAND ${GIT_EXECUTABLE} clone ${ARG_GIT_REPO} --depth 1 ${clone_opts} ${src_dir}
RESULT_VARIABLE clone_failed
ERROR_VARIABLE clone_error
)
if(clone_failed)
message(FATAL_ERROR "Failed to clone sources for dependency ${ARGV0}.\n ${clone_error}")
endif()
execute_process(COMMAND git clone ${ARG_GIT_REPO} --depth 1 ${clone_opts} ${src_dir})
endif()
add_subdirectory(${src_dir} ${bin_dir} ${subdir_opts})
else()
Expand Down

0 comments on commit a2e1556

Please sign in to comment.