Skip to content

Commit

Permalink
Merge remote-tracking branch 'app4triqs/unstable' into unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
dylex committed Sep 10, 2020
2 parents 1b413d2 + b849c43 commit 98fb471
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ target_compile_options(${PROJECT_NAME}_warnings
-Wpedantic
-Wno-sign-compare
-Wno-deprecated-comma-subscript
-Wno-unknown-warning-option
$<$<CXX_COMPILER_ID:GNU>:-Wshadow=local>
$<$<CXX_COMPILER_ID:GNU>:-Wno-attributes>
$<$<CXX_COMPILER_ID:Clang>:-Wshadow>
Expand Down
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 98fb471

Please sign in to comment.