Commit 557d5023 authored by partyd's avatar partyd
Browse files

ENH: Add option to control the protocol (http or git) use by git.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@13923 3bd1e089-480b-0410-8dfb-8563597acbee
parent 7b76d348
......@@ -84,8 +84,14 @@ ENDFUNCTION()
# Prerequisites
#------------------------------------------------------------------------------
set(git_repo http://github.com/commontk/CTK/raw/master/)
option(Slicer3_USE_GIT_PROTOCOL "If behind a firewall turn this off to use http instead." ON)
set(git_protocol "git")
if(NOT Slicer3_USE_GIT_PROTOCOL)
set(git_protocol "http")
endif()
set(git_repo http://github.com/commontk/CTK/raw/master/)
set(file CMake/ExternalProject.cmake)
downloadFile(${git_repo}/${file} ${CMAKE_BINARY_DIR}/${file})
......
......@@ -12,7 +12,7 @@ if (Slicer3_USE_QT)
if(NOT DEFINED CTK_DIR)
# message(STATUS "Adding project:${proj}")
ExternalProject_Add(${proj}
GIT_REPOSITORY "git://github.com/commontk/CTK.git"
GIT_REPOSITORY "${git_protocol}://github.com/commontk/CTK.git"
SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
BINARY_DIR ${proj}-build
CMAKE_GENERATOR ${gen}
......
......@@ -122,7 +122,7 @@ if(NOT DEFINED VTK_DIR OR NOT DEFINED VTK_SOURCE_DIR)
ExternalProject_Add(${proj}
SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
BINARY_DIR ${proj}-build
GIT_REPOSITORY "git://github.com/pieper/SlicerVTK.git"
GIT_REPOSITORY "${git_protocol}://github.com/pieper/SlicerVTK.git"
CMAKE_GENERATOR ${gen}
CMAKE_ARGS
-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
......
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