ecbuild_git
Manages an external Git repository.
ecbuild_git( PROJECT <name>
DIR <directory>
URL <giturl>
[ BRANCH <gitbranch> | TAG <gittag> ]
[ UPDATE | NOREMOTE ]
[ MANUAL ]
[ RECURSIVE ]
[ SHALLOW ] )
Options
- PROJECTrequired
project name for the Git repository to be managed
- DIRrequired
directory to clone the repository into (can be relative)
- URLrequired
Git URL of the remote repository to clone (see
git help clone)- BRANCHoptional, cannot be combined with TAG
Git branch to check out
- TAGoptional, cannot be combined with BRANCH
Git tag or commit id to check out
- UPDATEoptional, requires BRANCH, cannot be combined with NOREMOTE
Create a CMake target update to fetch changes from the remote repository
- NOREMOTEoptional, cannot be combined with UPDATE
Do not fetch changes from the remote repository
- MANUALoptional
Do not automatically switch branches or tags
- RECURSIVEoptional
Do a recursive fetch or update
- SHALLOWoptional
Do a shallow clone (
--depth 1) on initial checkout. When combined with RECURSIVE, submodules are also fetched at depth 1. Cannot be combined with TAG when it’s a commit ID (SHA). SHALLOW is not switchable and will fail if UPDATE is requested on an existing shallow clone.