Hello all,

As per my inquiry on the users mailing list, I have implemented support for the 
-origin parameter of git clone. It is backwards compatible as the parameter is 
optional and defaults to "origin".

Example use case:
After using ExternalProject_Add to download and built a supporting library, 
development of that library is needed. In the case of github/bitbucket, the 
cloned repository can be a fork. To simplify management, providing a more 
descriptive remote name is desired.

Usage:
  ExternalProject_Add( OpenIGTLink
    "${PLUSBUILD_EXTERNAL_PROJECT_CUSTOM_COMMANDS}"
    SOURCE_DIR "${PLUS_OpenIGTLink_SRC_DIR}"
    BINARY_DIR "${PLUS_OpenIGTLink_DIR}"
    #--Download step--------------
    GIT_REPOSITORY "${GIT_PROTOCOL}://github.com/adamrankin/OpenIGTLink.git"
    GIT_TAG "master"
    GIT_REMOTE_NAME "adamrankin_igtl"
    #--Configure step-------------
...

I have attached a patch that provides an implementation of this parameter and 
tested it for both cloning and updating.

Feedback is appreciated and I hope this is of use for others.

Kind regards,
Adam

Attachment: git_remote_name_support.patch
Description: git_remote_name_support.patch

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to