소스 검색

ENH: Added superbuild option CTK_USE_GIT_PROTOCOL

Since firewall doesn't always allow git protocol, turning off this option
will teach superbuild to use http protocol instead of git to clone repository.

Note also that git clone though http is slower
Jean-Christophe Fillion-Robin 15 년 전
부모
커밋
647b9b63c6
7개의 변경된 파일16개의 추가작업 그리고 6개의 파일을 삭제
  1. 1 1
      CMakeExternals/CTKData.cmake
  2. 1 1
      CMakeExternals/DCMTK.cmake
  3. 1 1
      CMakeExternals/Log4Qt.cmake
  4. 1 1
      CMakeExternals/PythonQt.cmake
  5. 1 1
      CMakeExternals/VTK.cmake
  6. 1 1
      CMakeExternals/ZMQ.cmake
  7. 10 0
      SuperBuild.cmake

+ 1 - 1
CMakeExternals/CTKData.cmake

@@ -14,7 +14,7 @@ IF(BUILD_TESTING)
   #   MESSAGE(STATUS "Adding project:${proj}")
     SET(CTKData_DEPENDS ${proj})
     ExternalProject_Add(${proj}
-        GIT_REPOSITORY git://github.com/commontk/CTKData.git
+        GIT_REPOSITORY ${git_protocol}://github.com/commontk/CTKData.git
         CONFIGURE_COMMAND ""
         BUILD_COMMAND ""
         INSTALL_COMMAND ""

+ 1 - 1
CMakeExternals/DCMTK.cmake

@@ -17,7 +17,7 @@ IF(${add_project})
     SET(DCMTK_DEPENDS ${proj})
 
     ExternalProject_Add(${proj}
-        GIT_REPOSITORY "git://github.com/commontk/DCMTK.git"
+        GIT_REPOSITORY "${git_protocol}://github.com/commontk/DCMTK.git"
         CMAKE_GENERATOR ${gen}
         BUILD_COMMAND ""
         CMAKE_ARGS

+ 1 - 1
CMakeExternals/Log4Qt.cmake

@@ -15,7 +15,7 @@ IF(${add_project})
 #     MESSAGE(STATUS "Adding project:${proj}")
     SET(Log4Qt_DEPENDS ${proj})
     ExternalProject_Add(${proj}
-        GIT_REPOSITORY "git://github.com/commontk/Log4Qt.git"
+        GIT_REPOSITORY "${git_protocol}://github.com/commontk/Log4Qt.git"
         GIT_TAG "patched"
         CMAKE_GENERATOR ${gen}
         BUILD_COMMAND ""

+ 1 - 1
CMakeExternals/PythonQt.cmake

@@ -22,7 +22,7 @@ IF(${add_project})
     ENDIF()
       
     ExternalProject_Add(${proj}
-      GIT_REPOSITORY "git://github.com/commontk/PythonQt.git"
+      GIT_REPOSITORY "${git_protocol}://github.com/commontk/PythonQt.git"
       GIT_TAG "patched"
       CMAKE_GENERATOR ${gen}
       BUILD_COMMAND ""

+ 1 - 1
CMakeExternals/VTK.cmake

@@ -15,7 +15,7 @@ IF(${add_project})
 #     MESSAGE(STATUS "Adding project:${proj}")
     SET(VTK_DEPENDS ${proj})
     ExternalProject_Add(${proj}
-      GIT_REPOSITORY git://vtk.org/VTK.git
+      GIT_REPOSITORY ${git_protocol}://vtk.org/VTK.git
       INSTALL_COMMAND ""
       CMAKE_GENERATOR ${gen}
       CMAKE_ARGS

+ 1 - 1
CMakeExternals/ZMQ.cmake

@@ -15,7 +15,7 @@ IF(${add_project})
   #   MESSAGE(STATUS "Adding project:${proj}")
     SET(ZMQ_DEPENDS ${proj})
     ExternalProject_Add(${proj}
-        GIT_REPOSITORY git://github.com/PatrickCheng/zeromq2.git
+        GIT_REPOSITORY ${git_protocol}://github.com/PatrickCheng/zeromq2.git
         INSTALL_COMMAND ""
         CMAKE_GENERATOR ${gen}
         CMAKE_ARGS

+ 10 - 0
SuperBuild.cmake

@@ -44,6 +44,16 @@ IF(NOT EXISTS ${CTK_BINARY_DIR}/CTK-build/bin)
 ENDIF()
 
 #-----------------------------------------------------------------------------
+# Git protocole option
+#
+option(CTK_USE_GIT_PROTOCOL "If behind a firewall turn this OFF to use http instead." ON)
+
+set(git_protocol "git")
+if(NOT CTK_USE_GIT_PROTOCOL)
+  set(git_protocol "http")
+endif()
+
+#-----------------------------------------------------------------------------
 # Enable and setup External project global properties
 #
 INCLUDE(ExternalProject)