Bläddra i källkod

COMP: Added possibility to define variable GIT_REPOSITORY variable in the dashboard script

If the variable GIT_REPOSITORY is not set or empty, the driver
script will make sure the official repository is used.
Jean-Christophe Fillion-Robin 15 år sedan
förälder
incheckning
8b4f1ab512
2 ändrade filer med 10 tillägg och 2 borttagningar
  1. 5 2
      CMake/ctkDashboardDriverScript.cmake
  2. 5 0
      CMake/ctkDashboardScript.EXAMPLE.cmake

+ 5 - 2
CMake/ctkDashboardDriverScript.cmake

@@ -59,7 +59,10 @@ foreach(var ${expected_variables})
   endif()
 endforeach()
 
-set(git_repository http://github.com/commontk/CTK.git)
+# If the dashscript doesn't define a GIT_REPOSITORY variable, let's define it here.
+if (NOT DEFINED GIT_REPOSITORY OR GIT_REPOSITORY STREQUAL "")
+  set(GIT_REPOSITORY http://github.com/commontk/CTK.git)
+endif()
 
 # Should binary directory be cleaned?
 set(empty_binary_directory FALSE)
@@ -98,7 +101,7 @@ if(empty_binary_directory)
 endif()
 
 if(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
-  set(CTEST_CHECKOUT_COMMAND "${CTEST_GIT_COMMAND} clone ${git_repository} ${CTEST_SOURCE_DIRECTORY}")
+  set(CTEST_CHECKOUT_COMMAND "${CTEST_GIT_COMMAND} clone ${GIT_REPOSITORY} ${CTEST_SOURCE_DIRECTORY}")
 endif()
 
 set(CTEST_UPDATE_COMMAND "${CTEST_GIT_COMMAND}")

+ 5 - 0
CMake/ctkDashboardScript.EXAMPLE.cmake

@@ -77,6 +77,11 @@ find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
 find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
 find_program(CTEST_GIT_COMMAND NAMES git)
 
+#
+# Git repository - Overwrite the default value provided by the driver script
+#
+# set(GIT_REPOSITORY http://github.com/YOURUSERNAME/CTK.git)
+
 ##########################################
 # WARNING: DO NOT EDIT BEYOND THIS POINT #
 ##########################################